def test_bar_namespace(self): """ Asserts namespace config output with heading, header & parameters. TODO: test for values as well """ if not TestShowConfig.is_bar_present: return exp_heading = "~~bar Namespace Configuration" exp_header = "NODE" exp_params_bar = [ 'allow-nonxdr-writes', 'allow-xdr-writes', 'conflict-resolution-policy', 'default-ttl', 'disallow-null-setname', 'enable-xdr', 'evict-tenths-pct', 'high-water-disk-pct', 'high-water-memory-pct', ('ldt-enabled', None), ('ldt-page-size', None), 'memory-size', 'ns-forward-xdr-writes', 'read-consistency-level-override', ('repl-factor', 'replication-factor'), 'sets-enable-xdr', 'single-bin', 'stop-writes-pct', ('total-bytes-memory', None), 'write-commit-level-override' ] actual_heading, actual_header, actual_params = test_util.parse_output( TestShowConfig.bar_namespace_config) self.assertTrue(exp_heading in actual_heading) self.assertTrue(exp_header in actual_header) self.assertTrue( test_util.check_for_subset(actual_params, exp_params_bar))
def test_reads_latency(self): """ Asserts <b> reads latency <b> output with heading, header & no of node processed(based on row count). TODO: test for values as well """ exp_heading = [("~~reads Latency~~", "~~read Latency~~")] exp_header= ['Node', 'Time Span', 'Ops/Sec', '%>1Ms', '%>8Ms', '%>64Ms'] exp_no_of_rows = len(TestShowLatency.rc.cluster._live_nodes) actual_heading, actual_header, actual_no_of_rows = test_util.parse_output(TestShowLatency.reads_latency, horizontal = True) if actual_heading: self.assertTrue(test_util.check_for_subset(actual_heading, exp_heading)) if actual_header: self.assertEqual(exp_header, actual_header) if actual_no_of_rows: self.assertEqual(exp_no_of_rows, int(actual_no_of_rows.strip()))
def test_network(self): """ This test will assert network output on heading, header, parameters. TODO: test for values as well """ exp_heading = "~~Network Configuration" exp_header = "NODE" exp_params = [('fabric-keepalive-enabled', 'fabric.keepalive-enabled'), ('fabric-keepalive-intvl', 'fabric.keepalive-intvl'), ('fabric-keepalive-probes', 'fabric.keepalive-probes'), ('fabric-keepalive-time', 'fabric.keepalive-time'), ('fabric-port', 'fabric.port'), ('heartbeat-address', 'heartbeat.address', 'heartbeat.addresses', None), ('heartbeat-interval', 'heartbeat.interval'), ('heartbeat-mode', 'heartbeat.mode'), ('heartbeat-port', 'heartbeat.port', None), ('heartbeat-protocol', 'heartbeat.protocol'), ('heartbeat-timeout', 'heartbeat.timeout'), ('network-info-port', 'info.port'), ('reuse-address', 'service.reuse-address', None), ('service-address', 'service.address'), ('service-port','service.port')] actual_heading, actual_header, actual_params = test_util.parse_output(TestShowConfig.network_config) self.assertTrue(exp_heading in actual_heading) self.assertTrue(exp_header in actual_header) self.assertTrue(test_util.check_for_subset(actual_params, exp_params))
def test_namespace_usage(self): """ This test will assert <b> info namespace usage </b> output for heading, headerline1, headerline2 displayed in output TODO: test for values as well """ exp_heading = "~~Namespace Usage Information" exp_header = [ 'Node', 'Namespace', 'Total Records', 'Expirations,Evictions', 'Stop Writes', 'Disk Used', 'Disk Used%', 'HWM Disk%', 'Mem Used', 'Mem Used%', 'HWM Mem%', 'Stop Writes%', ] actual_heading, actual_header, actual_no_of_rows = test_util.parse_output( TestInfo.namespace_usage_info, horizontal=True) self.assertTrue(test_util.check_for_subset(actual_header, exp_header)) self.assertTrue(exp_heading in actual_heading)
def test_test_namespace(self): """ Asserts namespace config output with heading, header & parameters. TODO: test for values as well """ exp_heading = "~~test Namespace Configuration" exp_header = "NODE" exp_params_test = [ 'allow-nonxdr-writes', 'allow-xdr-writes', 'conflict-resolution-policy', 'default-ttl', 'disallow-null-setname', 'enable-xdr', 'evict-tenths-pct', 'high-water-disk-pct', 'high-water-memory-pct', ('ldt-enabled', None), ('ldt-page-size', None), 'memory-size', 'ns-forward-xdr-writes', 'read-consistency-level-override', ('repl-factor', 'replication-factor'), 'sets-enable-xdr', 'single-bin', 'stop-writes-pct', ('total-bytes-memory', None), 'write-commit-level-override' ] actual_heading, actual_header, actual_params = test_util.parse_output(TestShowConfig.test_namespace_config) self.assertTrue(exp_heading in actual_heading) self.assertTrue(exp_header in actual_header) self.assertTrue(test_util.check_for_subset(actual_params, exp_params_test))
def test_network(self): """ This test will assert network output on heading, header, parameters. TODO: test for values as well """ exp_heading = "~~Network Configuration" exp_header = "NODE" exp_params = [('fabric-keepalive-enabled', 'fabric.keepalive-enabled'), ('fabric-keepalive-intvl', 'fabric.keepalive-intvl'), ('fabric-keepalive-probes', 'fabric.keepalive-probes'), ('fabric-keepalive-time', 'fabric.keepalive-time'), ('fabric-port', 'fabric.port'), ('heartbeat-address', 'heartbeat.address', 'heartbeat.addresses', None), ('heartbeat-interval', 'heartbeat.interval'), ('heartbeat-mode', 'heartbeat.mode'), ('heartbeat-port', 'heartbeat.port', None), ('heartbeat-protocol', 'heartbeat.protocol'), ('heartbeat-timeout', 'heartbeat.timeout'), ('network-info-port', 'info.port'), ('reuse-address', 'service.reuse-address', None), ('service-address', 'service.address'), ('service-port', 'service.port')] actual_heading, actual_header, actual_params = test_util.parse_output( TestShowConfig.network_config) self.assertTrue(exp_heading in actual_heading) self.assertTrue(exp_header in actual_header) self.assertTrue(test_util.check_for_subset(actual_params, exp_params))
def test_test_bin(self): """ This test will assert <b> test Bin Statistics </b> output for heading, header and parameters. TODO: test for values as well """ exp_heading = "~test Bin Statistics" exp_header = "NODE" exp_params = [('bin-names-quota','bin_names_quota'), ('num-bin-names','bin_names')] actual_heading, actual_header, actual_params = test_util.parse_output(TestShowStatistics.test_bin_stats) self.assertTrue(exp_heading in actual_heading) self.assertTrue(exp_header in actual_header) self.assertTrue(test_util.check_for_subset(actual_params, exp_params))
def test_test_bin(self): """ This test will assert <b> test Bin Statistics </b> output for heading, header and parameters. TODO: test for values as well """ exp_heading = "~test Bin Statistics" exp_header = "NODE" exp_params = [('bin-names-quota', 'bin_names_quota'), ('num-bin-names', 'bin_names')] actual_heading, actual_header, actual_params = test_util.parse_output( TestShowStatistics.test_bin_stats) self.assertTrue(exp_heading in actual_heading) self.assertTrue(exp_header in actual_header) self.assertTrue(test_util.check_for_subset(actual_params, exp_params))
def test_service(self): """ Asserts service config output with heading, header & parameters. TODO: test for values as well """ exp_heading = "~~Service Configuration" exp_header = "NODE" exp_params = [ ('allow-inline-transactions', None), 'batch-max-requests', 'batch-priority', 'batch-threads', ('fabric-workers', None), 'info-threads', ('ldt-benchmarks', None), ('max-msgs-per-type', None), ('memory-accounting', None), ('microbenchmarks', None), 'migrate-max-num-incoming', ('migrate-rx-lifetime-ms', None), 'migrate-threads', 'nsup-delete-sleep', 'nsup-period', 'nsup-startup-evict', ('paxos-max-cluster-size', None), ('paxos-protocol', None), ('paxos-recovery-policy', None), ('paxos-retransmit-period', None), 'paxos-single-replica-limit', 'prole-extra-ttl', 'proto-fd-idle-ms', 'proto-fd-max', 'proto-slow-netio-sleep-ms', 'query-batch-size', 'query-bufpool-size', 'query-in-transaction-thread', 'query-long-q-max-size', 'query-priority', 'query-rec-count-bound', 'query-req-in-query-thread', 'query-req-max-inflight', 'query-short-q-max-size', 'query-threads', 'query-threshold', 'query-worker-threads', ('replication-fire-and-forget', None), ('respond-client-on-master-completion', None), 'service-threads', ('sindex-data-max-memory', None), ('snub-nodes', None), ('storage-benchmarks', None), 'ticker-interval', 'transaction-max-ms', 'transaction-pending-limit', 'transaction-queues', ('transaction-repeatable-read', None), 'transaction-retry-ms', 'transaction-threads-per-queue', ('udf-runtime-gmax-memory', None), ('udf-runtime-max-memory', None), ('use-queue-per-device', None), ('write-duplicate-resolution-disable', None) ] actual_heading, actual_header, actual_params = test_util.parse_output( TestShowConfig.service_config) self.assertTrue(exp_heading in actual_heading) self.assertTrue(exp_header in actual_header) self.assertTrue(test_util.check_for_subset(actual_params, exp_params))
def test_namespace_object(self): """ This test will assert <b> info namespace Object </b> output for heading, headerline1, headerline2 displayed in output TODO: test for values as well """ exp_heading = "~~Namespace Object Information" exp_header = [ 'Namespace', 'Node', 'Total Records', 'Repl Factor', 'Objects (Master,Prole,Non-Replica)', 'Tombstones (Master,Prole,Non-Replica)', 'Pending Migrates', ('Rack ID', None) ] actual_heading, actual_header, actual_no_of_rows = test_util.parse_output( TestInfo.namespace_object_info, horizontal=True) self.assertTrue(test_util.check_for_subset(actual_header, exp_header)) self.assertTrue(exp_heading in actual_heading)
def test_namespace_object(self): """ This test will assert <b> info namespace Object </b> output for heading, headerline1, headerline2 displayed in output TODO: test for values as well """ exp_heading = "~~Namespace Object Information" exp_header = [ 'Namespace', 'Node', 'Total Records', 'Repl Factor', 'Objects (Master,Prole,Non-Replica)', 'Tombstones (Master,Prole,Non-Replica)', 'Pending Migrates', ('Rack ID', None) ] actual_heading, actual_header, actual_no_of_rows = test_util.parse_output(TestInfo.namespace_object_info, horizontal = True) self.assertTrue(test_util.check_for_subset(actual_header, exp_header)) self.assertTrue(exp_heading in actual_heading)
def test_namespace_usage(self): """ This test will assert <b> info namespace usage </b> output for heading, headerline1, headerline2 displayed in output TODO: test for values as well """ exp_heading = "~~Namespace Usage Information" exp_header = [ 'Node', 'Namespace', 'Total Records', 'Expirations,Evictions', 'Stop Writes', 'Disk Used', 'Disk Used%', 'HWM Disk%', 'Mem Used', 'Mem Used%', 'HWM Mem%', 'Stop Writes%', ] actual_heading, actual_header, actual_no_of_rows = test_util.parse_output(TestInfo.namespace_usage_info, horizontal = True) self.assertTrue(test_util.check_for_subset(actual_header, exp_header)) self.assertTrue(exp_heading in actual_heading)
def test_reads_latency(self): """ Asserts <b> reads latency <b> output with heading, header & no of node processed(based on row count). TODO: test for values as well """ exp_heading = [("~~reads Latency~~", "~~read Latency~~")] exp_header = [ 'Node', 'Time Span', 'Ops/Sec', '%>1Ms', '%>8Ms', '%>64Ms' ] exp_no_of_rows = len(TestShowLatency.rc.cluster._live_nodes) actual_heading, actual_header, actual_no_of_rows = test_util.parse_output( TestShowLatency.reads_latency, horizontal=True) if actual_heading: self.assertTrue( test_util.check_for_subset(actual_heading, exp_heading)) if actual_header: self.assertEqual(exp_header, actual_header) if actual_no_of_rows: self.assertEqual(exp_no_of_rows, int(actual_no_of_rows.strip()))
def test_service(self): """ Asserts service config output with heading, header & parameters. TODO: test for values as well """ exp_heading = "~~Service Configuration" exp_header = "NODE" exp_params = [ ('allow-inline-transactions', None), 'batch-max-requests', 'batch-priority', 'batch-threads', ('fabric-workers', None), 'info-threads', ('ldt-benchmarks', None), ('max-msgs-per-type', None), ('memory-accounting', None), ('microbenchmarks', None), 'migrate-max-num-incoming', ('migrate-rx-lifetime-ms', None), 'migrate-threads', 'nsup-startup-evict', ('paxos-max-cluster-size', None), ('paxos-protocol', None), ('paxos-recovery-policy', None), ('paxos-retransmit-period', None), 'paxos-single-replica-limit', 'proto-fd-idle-ms', 'proto-fd-max', 'proto-slow-netio-sleep-ms', 'query-batch-size', 'query-bufpool-size', 'query-in-transaction-thread', 'query-long-q-max-size', 'query-priority', 'query-rec-count-bound', 'query-req-in-query-thread', 'query-req-max-inflight', 'query-short-q-max-size', 'query-threads', 'query-threshold', 'query-worker-threads', ('replication-fire-and-forget', None), ('respond-client-on-master-completion', None), 'service-threads', ('sindex-data-max-memory', None), ('snub-nodes', None), ('storage-benchmarks', None), 'ticker-interval', 'transaction-max-ms', ('transaction-pending-limit', None), 'transaction-queues', ('transaction-repeatable-read', None), 'transaction-retry-ms', 'transaction-threads-per-queue', ('udf-runtime-gmax-memory', None), ('udf-runtime-max-memory', None), ('use-queue-per-device', None), ('write-duplicate-resolution-disable', None) ] actual_heading, actual_header, actual_params = test_util.parse_output(TestShowConfig.service_config) self.assertTrue(exp_heading in actual_heading) self.assertTrue(exp_header in actual_header) self.assertTrue(test_util.check_for_subset(actual_params, exp_params))
def test_test_namespace(self): """ This test will assert <b> test Namespace Statistics </b> output for heading, header and parameters. TODO: test for values as well """ exp_heading = "~test Namespace Statistics" exp_header = "NODE" exp_params = [ 'allow-nonxdr-writes', 'allow-xdr-writes', ('available-bin-names', 'available_bin_names'), 'conflict-resolution-policy', ('current-time', 'current_time'), ('data-used-bytes-memory', 'memory_used_data_bytes'), 'default-ttl', 'disallow-null-setname', 'enable-xdr', 'evict-tenths-pct', ('evicted-objects', 'evicted_objects'), ('expired-objects', 'expired_objects'), ('free-pct-memory', 'memory_free_pct'), 'high-water-disk-pct', 'high-water-memory-pct', ('hwm-breached', 'hwm_breached'), ('index-used-bytes-memory', 'memory_used_index_bytes'), ('ldt-enabled', None), ('ldt-page-size', None), ('master-objects', 'master_objects'), ('master-sub-objects', 'master_sub_objects', None), ('max-void-time', 'max_void_time', None), 'memory-size', ('migrate-rx-partitions-initial','migrate_rx_partitions_initial', None), ('migrate-rx-partitions-remaining','migrate_rx_partitions_remaining', None), ('migrate-tx-partitions-imbalance','migrate_tx_partitions_imbalance', None), ('migrate-tx-partitions-initial','migrate_tx_partitions_initial', None), ('migrate-tx-partitions-remaining','migrate_tx_partitions_remaining', None), ('non-expirable-objects', 'non_expirable_objects'), 'ns-forward-xdr-writes', ('nsup-cycle-duration', 'nsup_cycle_duration'), ('nsup-cycle-sleep-pct', 'nsup_cycle_sleep_pct', None), 'objects', ('prole-objects', 'prole_objects'), ('prole-sub-objects', 'prole_sub_objects', None), 'read-consistency-level-override', ('repl-factor', 'replication-factor'), ('set-deleted-objects', 'set_deleted_objects', None), 'sets-enable-xdr', ('sindex-used-bytes-memory', 'memory_used_sindex_bytes'), 'single-bin', ('stop-writes', 'stop_writes'), 'stop-writes-pct', ('sub-objects', 'sub_objects', None), ('total-bytes-memory', None), ('type', None), ('used-bytes-memory', 'memory_used_bytes'), 'write-commit-level-override', ] actual_heading, actual_header, actual_params = test_util.parse_output(TestShowStatistics.test_namespace_stats) self.assertTrue(exp_heading in actual_heading) self.assertTrue(exp_header in actual_header) self.assertTrue(test_util.check_for_subset(actual_params, exp_params))
def test_service(self): """ This test will assert <b> Service Statistics </b> output for heading, header and parameters. TODO: test for values as well """ exp_heading = "~Service Statistics" exp_header = "NODE" exp_params = [ ('batch_errors', 'batch_error'), 'batch_initiate', 'batch_queue', 'batch_timeout', ('batch_tree_count', None), 'client_connections', 'cluster_integrity', 'cluster_key', 'cluster_size', ('data-used-bytes-memory', None), ('err_duplicate_proxy_request', None), ('err_out_of_space', None), ('err_replica_non_null_node', None), ('err_replica_null_node', None), ('err_rw_cant_put_unique', None), ('err_rw_pending_limit', None), ('err_rw_request_not_found', None), ('err_storage_queue_full', None), ('err_sync_copy_null_master', None), ('err_tsvc_requests', None), ('err_write_fail_bin_exists', None), ('err_write_fail_bin_name', None), ('err_write_fail_bin_not_found', None), ('err_write_fail_forbidden', None), ('err_write_fail_generation', None), ('err_write_fail_incompatible_type', None), ('err_write_fail_key_exists', None), ('err_write_fail_key_mismatch', None), ('err_write_fail_not_found', None), ('err_write_fail_parameter', None), ('err_write_fail_prole_delete', None), ('err_write_fail_prole_generation', None), ('err_write_fail_prole_unknown', None), ('err_write_fail_record_too_big', None), ('err_write_fail_unknown', None), ('fabric_msgs_rcvd', None), ('fabric_msgs_sent', None), ('free-pct-disk', None), ('free-pct-memory', None), 'heartbeat_received_foreign', 'heartbeat_received_self', ('index-used-bytes-memory', None), 'info_queue', 'objects', ('ongoing_write_reqs', None), ('partition_absent', None), ('partition_actual', None), ('partition_desync', None), ('partition_object_count', None), ('partition_ref_count', None), ('partition_replica', None), 'paxos_principal', ('proxy_action', None), 'proxy_in_progress', ('proxy_initiate', None), ('proxy_retry', None), ('proxy_retry_new_dest', None), ('proxy_retry_q_full', None), ('proxy_retry_same_dest', None), ('proxy_unproxy', None), ('query_abort', None), ('query_agg', None), ('query_agg_abort', None), ('query_agg_avg_rec_count', None), ('query_agg_err', None), ('query_agg_success', None), ('query_avg_rec_count', None), ('query_fail', None), ('query_long_queue_full', None), 'query_long_running', ('query_lookup_abort', None), ('query_lookup_avg_rec_count', None), ('query_lookup_err', None), ('query_lookup_success', None), ('query_lookups', None), ('query_reqs', None), ('query_short_queue_full', None), 'query_short_running', ('query_success', None), ('queue', 'tsvc_queue'), ('read_dup_prole', None), 'reaped_fds', ('record_locks', None), ('record_refs', None), ('rw_err_ack_badnode', None), ('rw_err_ack_internal', None), ('rw_err_ack_nomatch', None), ('rw_err_dup_cluster_key', None), ('rw_err_dup_internal', None), ('rw_err_dup_send', None), ('rw_err_write_cluster_key', None), ('rw_err_write_internal', None), ('rw_err_write_send', None), ('sindex-used-bytes-memory', None), ('sindex_gc_activity_dur', None), 'sindex_gc_garbage_cleaned', 'sindex_gc_garbage_found', ('sindex_gc_inactivity_dur', None), 'sindex_gc_list_creation_time', 'sindex_gc_list_deletion_time', 'sindex_gc_objects_validated', 'sindex_ucgarbage_found', ('stat_cluster_key_err_ack_dup_trans_reenqueue', None), ('stat_delete_success', None), ('stat_deleted_set_objects', None), ('stat_duplicate_operation', None), ('stat_evicted_objects', None), ('stat_evicted_objects_time', None), ('stat_expired_objects', None), ('stat_ldt_proxy', None), ('stat_nsup_deletes_not_shipped', None), ('stat_proxy_errs', None), ('stat_proxy_reqs', None), ('stat_proxy_reqs_xdr', None), ('stat_proxy_success', None), ('stat_read_errs_notfound', None), ('stat_read_errs_other', None), ('stat_read_reqs', None), ('stat_read_reqs_xdr', None), ('stat_read_success', None), ('stat_rw_timeout', None), ('stat_write_errs', None), ('stat_write_errs_notfound', None), ('stat_write_errs_other', None), ('stat_write_reqs', None), ('stat_write_reqs_xdr', None), ('stat_write_success', None), ('stat_zero_bin_records', None), ('storage_defrag_corrupt_record', None), ('sub-records', 'sub_objects', None), 'system_free_mem_pct', 'system_swapping', ('total-bytes-disk', None), ('total-bytes-memory', None), ('transactions', None), ('tree_count', None), ('udf_delete_err_others', None), ('udf_delete_reqs', None), ('udf_delete_success', None), ('udf_lua_errs', None), ('udf_query_rec_reqs', None), ('udf_read_errs_other', None), ('udf_read_reqs', None), ('udf_read_success', None), ('udf_replica_writes', None), ('udf_scan_rec_reqs', None), ('udf_write_err_others', None), ('udf_write_reqs', None), ('udf_write_success', None), 'uptime', ('used-bytes-disk', None), ('used-bytes-memory', None), ('waiting_transactions', None), ('write_master', None), ('write_prole', None) ] actual_heading, actual_header, actual_params = test_util.parse_output(TestShowStatistics.service_stats) self.assertTrue(exp_heading in actual_heading) self.assertTrue(exp_header in actual_header) self.assertTrue(test_util.check_for_subset(actual_params, exp_params))
def test_service(self): """ This test will assert <b> Service Statistics </b> output for heading, header and parameters. TODO: test for values as well """ exp_heading = "~Service Statistics" exp_header = "NODE" exp_params = [ ('batch_errors', 'batch_error'), 'batch_initiate', 'batch_queue', 'batch_timeout', ('batch_tree_count', None), 'client_connections', 'cluster_integrity', 'cluster_key', 'cluster_size', ('data-used-bytes-memory', None), ('err_duplicate_proxy_request', None), ('err_out_of_space', None), ('err_replica_non_null_node', None), ('err_replica_null_node', None), ('err_rw_cant_put_unique', None), ('err_rw_pending_limit', None), ('err_rw_request_not_found', None), ('err_storage_queue_full', None), ('err_sync_copy_null_master', None), ('err_tsvc_requests', None), ('err_write_fail_bin_exists', None), ('err_write_fail_bin_name', None), ('err_write_fail_bin_not_found', None), ('err_write_fail_forbidden', None), ('err_write_fail_generation', None), ('err_write_fail_incompatible_type', None), ('err_write_fail_key_exists', None), ('err_write_fail_key_mismatch', None), ('err_write_fail_not_found', None), ('err_write_fail_parameter', None), ('err_write_fail_prole_delete', None), ('err_write_fail_prole_generation', None), ('err_write_fail_prole_unknown', None), ('err_write_fail_record_too_big', None), ('err_write_fail_unknown', None), ('fabric_msgs_rcvd', None), ('fabric_msgs_sent', None), ('free-pct-disk', None), ('free-pct-memory', None), 'heartbeat_received_foreign', 'heartbeat_received_self', ('index-used-bytes-memory', None), 'info_queue', 'objects', ('ongoing_write_reqs', None), ('partition_absent', None), ('partition_actual', None), ('partition_desync', None), ('partition_object_count', None), ('partition_ref_count', None), ('partition_replica', None), 'paxos_principal', ('proxy_action', None), 'proxy_in_progress', ('proxy_initiate', None), ('proxy_retry', None), ('proxy_retry_new_dest', None), ('proxy_retry_q_full', None), ('proxy_retry_same_dest', None), ('proxy_unproxy', None), ('query_abort', None), ('query_agg', None), ('query_agg_abort', None), ('query_agg_avg_rec_count', None), ('query_agg_err', None), ('query_agg_success', None), ('query_avg_rec_count', None), ('query_fail', None), ('query_long_queue_full', None), 'query_long_running', ('query_lookup_abort', None), ('query_lookup_avg_rec_count', None), ('query_lookup_err', None), ('query_lookup_success', None), ('query_lookups', None), ('query_reqs', None), ('query_short_queue_full', None), 'query_short_running', ('query_success', None), ('queue', 'tsvc_queue'), ('read_dup_prole', None), 'reaped_fds', ('record_locks', None), ('record_refs', None), ('rw_err_ack_badnode', None), ('rw_err_ack_internal', None), ('rw_err_ack_nomatch', None), ('rw_err_dup_cluster_key', None), ('rw_err_dup_internal', None), ('rw_err_dup_send', None), ('rw_err_write_cluster_key', None), ('rw_err_write_internal', None), ('rw_err_write_send', None), ('sindex-used-bytes-memory', None), ('sindex_gc_activity_dur', None), 'sindex_gc_garbage_cleaned', 'sindex_gc_garbage_found', ('sindex_gc_inactivity_dur', None), 'sindex_gc_list_creation_time', 'sindex_gc_list_deletion_time', 'sindex_gc_objects_validated', 'sindex_ucgarbage_found', ('stat_cluster_key_err_ack_dup_trans_reenqueue', None), ('stat_delete_success', None), ('stat_deleted_set_objects', None), ('stat_duplicate_operation', None), ('stat_evicted_objects', None), ('stat_evicted_objects_time', None), ('stat_expired_objects', None), ('stat_ldt_proxy', None), ('stat_nsup_deletes_not_shipped', None), ('stat_proxy_errs', None), ('stat_proxy_reqs', None), ('stat_proxy_reqs_xdr', None), ('stat_proxy_success', None), ('stat_read_errs_notfound', None), ('stat_read_errs_other', None), ('stat_read_reqs', None), ('stat_read_reqs_xdr', None), ('stat_read_success', None), ('stat_rw_timeout', None), ('stat_write_errs', None), ('stat_write_errs_notfound', None), ('stat_write_errs_other', None), ('stat_write_reqs', None), ('stat_write_reqs_xdr', None), ('stat_write_success', None), ('stat_zero_bin_records', None), ('storage_defrag_corrupt_record', None), ('sub-records', 'sub_objects', None), 'system_free_mem_pct', 'system_swapping', ('total-bytes-disk', None), ('total-bytes-memory', None), ('transactions', None), ('tree_count', None), ('udf_delete_err_others', None), ('udf_delete_reqs', None), ('udf_delete_success', None), ('udf_lua_errs', None), ('udf_query_rec_reqs', None), ('udf_read_errs_other', None), ('udf_read_reqs', None), ('udf_read_success', None), ('udf_replica_writes', None), ('udf_scan_rec_reqs', None), ('udf_write_err_others', None), ('udf_write_reqs', None), ('udf_write_success', None), 'uptime', ('used-bytes-disk', None), ('used-bytes-memory', None), ('waiting_transactions', None), ('write_master', None), ('write_prole', None) ] actual_heading, actual_header, actual_params = test_util.parse_output( TestShowStatistics.service_stats) self.assertTrue(exp_heading in actual_heading) self.assertTrue(exp_header in actual_header) self.assertTrue(test_util.check_for_subset(actual_params, exp_params))
def test_test_namespace(self): """ This test will assert <b> test Namespace Statistics </b> output for heading, header and parameters. TODO: test for values as well """ exp_heading = "~test Namespace Statistics" exp_header = "NODE" exp_params = [ 'allow-nonxdr-writes', 'allow-xdr-writes', ('available-bin-names', 'available_bin_names'), 'conflict-resolution-policy', ('current-time', 'current_time'), ('data-used-bytes-memory', 'memory_used_data_bytes'), 'default-ttl', 'disallow-null-setname', 'enable-xdr', 'evict-tenths-pct', ('evicted-objects', 'evicted_objects'), ('expired-objects', 'expired_objects'), ('free-pct-memory', 'memory_free_pct'), 'high-water-disk-pct', 'high-water-memory-pct', ('hwm-breached', 'hwm_breached'), ('index-used-bytes-memory', 'memory_used_index_bytes'), ('ldt-enabled', None), ('ldt-page-size', None), ('master-objects', 'master_objects'), ('master-sub-objects', 'master_sub_objects', None), ('max-void-time', 'max_void_time', None), 'memory-size', ('migrate-rx-partitions-initial', 'migrate_rx_partitions_initial', None), ('migrate-rx-partitions-remaining', 'migrate_rx_partitions_remaining', None), ('migrate-tx-partitions-imbalance', 'migrate_tx_partitions_imbalance', None), ('migrate-tx-partitions-initial', 'migrate_tx_partitions_initial', None), ('migrate-tx-partitions-remaining', 'migrate_tx_partitions_remaining', None), ('non-expirable-objects', 'non_expirable_objects'), 'ns-forward-xdr-writes', ('nsup-cycle-duration', 'nsup_cycle_duration'), ('nsup-cycle-sleep-pct', 'nsup_cycle_sleep_pct', None), 'objects', ('prole-objects', 'prole_objects'), ('prole-sub-objects', 'prole_sub_objects', None), 'read-consistency-level-override', ('repl-factor', 'replication-factor'), ('set-deleted-objects', 'set_deleted_objects', None), 'sets-enable-xdr', ('sindex-used-bytes-memory', 'memory_used_sindex_bytes'), 'single-bin', ('stop-writes', 'stop_writes'), 'stop-writes-pct', ('sub-objects', 'sub_objects', None), ('total-bytes-memory', None), ('type', None), ('used-bytes-memory', 'memory_used_bytes'), 'write-commit-level-override', ] actual_heading, actual_header, actual_params = test_util.parse_output( TestShowStatistics.test_namespace_stats) self.assertTrue(exp_heading in actual_heading) self.assertTrue(exp_header in actual_header) self.assertTrue(test_util.check_for_subset(actual_params, exp_params))