Unit Test Results.

Designed for use with JUnit and Ant.

All Tests

ClassNameStatusTypeTime(s)
8_cythonno_x86_64_1_8test_network_topology_strategySuccess261.260
8_cythonno_x86_64_1_8test_disk_balance_bootstrapSuccess106.026
8_cythonno_x86_64_1_8test_throttled_partition_updateSuccess511.215
8_cythonno_x86_64_1_8test_resume_failed_replaceSuccess164.652
8_cythonno_x86_64_1_8test_initial_empty_repair_tablesSkippedhangs CI

/home/cassandra/cassandra-dtest/repair_tests/repair_test.py:1416: hangs CI
0.001
8_cythonno_x86_64_2_8test_network_topology_strategy_each_quorumSuccess189.963
8_cythonno_x86_64_2_8test_add_dc_after_mv_simple_replicationSuccess118.204
8_cythonno_x86_64_2_8test_really_complex_repairSuccess285.219
8_cythonno_x86_64_2_8test_restart_failed_replace_with_reset_resume_stateSuccess198.192
8_cythonno_x86_64_2_8test_repair_parent_tableSuccess84.810
8_cythonno_x86_64_3_8test_simple_strategy_usersSuccess188.136
8_cythonno_x86_64_3_8test_add_dc_after_mv_network_replicationSuccess123.582
8_cythonno_x86_64_3_8test_replace_stopped_nodeSuccess197.027
8_cythonno_x86_64_3_8test_restart_failed_replaceSuccess263.056
8_cythonno_x86_64_3_8test_repair_tableSuccess86.318
8_cythonno_x86_64_4_8test_simple_strategy_each_quorum_usersSuccess91.692
8_cythonno_x86_64_4_8test_add_node_after_mvSuccess85.596
8_cythonno_x86_64_4_8test_replace_shutdown_nodeSuccess190.828
8_cythonno_x86_64_4_8test_rf_collapse_gossiping_property_file_snitch_multi_dcSkipped5.1 > 5.0.x

/home/cassandra/cassandra-dtest/conftest.py:468: 5.1 > 5.0.x
0.225
8_cythonno_x86_64_5_8test_network_topology_strategy_usersSuccess335.446
8_cythonno_x86_64_5_8test_add_node_after_wide_mv_with_range_deletionsSuccess124.469
8_cythonno_x86_64_5_8test_replace_stopped_node_same_addressSuccess196.659
8_cythonno_x86_64_5_8test_rf_expand_gossiping_property_file_snitch_multi_dcSkipped5.1 > 5.0.x

/home/cassandra/cassandra-dtest/conftest.py:468: 5.1 > 5.0.x
0.225
8_cythonno_x86_64_6_8test_network_topology_strategy_each_quorum_usersSuccess100.243
8_cythonno_x86_64_6_8test_add_node_after_very_wide_mvSuccess312.492
8_cythonno_x86_64_6_8test_replace_first_bootSuccess194.482
8_cythonno_x86_64_6_8test_multidatacenter_local_quorumFailureAssertionError: too many reads hit the degraded node: 5 assert 5 <= 1

self = <snitch_test.TestDynamicEndpointSnitch object at 0x7f71480f0040>

@pytest.mark.resource_intensive
@since('3.10')
def test_multidatacenter_local_quorum(self):
'''
@jira_ticket CASSANDRA-13074

If we do only local datacenters reads in a multidatacenter DES setup,
DES should take effect and route around a degraded node
'''

def no_cross_dc(scores, cross_dc_nodes):
return all('/' + k.address() not in scores for k in cross_dc_nodes)

def snitchable(scores_before, scores_after, needed_nodes):
return all('/' + k.address() in scores_before and '/' + k.address()
in scores_after for k in needed_nodes)

cluster = self.cluster
cluster.populate([3, 3])
coordinator_node, healthy_node, degraded_node, node4, node5, node6 = cluster.nodelist()
# increase DES reset/update interval so we clear any cross-DC startup reads faster
cluster.set_configuration_options(values={'dynamic_snitch_reset_interval_in_ms': 10000,
'dynamic_snitch_update_interval_in_ms': 50,
'phi_convict_threshold': 12})
# Delay reads on the degraded node by 50 milliseconds
degraded_node.start(jvm_args=['-Dcassandra.test.read_iteration_delay_ms=50',
'-Dcassandra.allow_unsafe_join=true'])
cluster.start()

des = make_mbean('db', type='DynamicEndpointSnitch')
read_stage = make_mbean('metrics', type='ThreadPools', path='request',
scope='ReadStage', name='CompletedTasks')
session = self.patient_exclusive_cql_connection(coordinator_node)
session.execute("CREATE KEYSPACE snitchtestks WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': 3, 'dc2': 3}")
session.execute("CREATE TABLE snitchtestks.tbl1 (key int PRIMARY KEY) WITH speculative_retry = 'NONE'")
read_stmt = session.prepare("SELECT * FROM snitchtestks.tbl1 where key = ?")
read_stmt.consistency_level = ConsistencyLevel.LOCAL_QUORUM
insert_stmt = session.prepare("INSERT INTO snitchtestks.tbl1 (key) VALUES (?)")
insert_stmt.consistency_level = ConsistencyLevel.ALL
with JolokiaAgent(coordinator_node) as jmx:
with JolokiaAgent(degraded_node) as bad_jmx:
for x in range(0, 150):
session.execute(insert_stmt, [x])

cleared = False
# Wait for a snitch reset in case any earlier
# startup process populated cross-DC read timings
while not cleared:
scores = jmx.read_attribute(des, 'Scores')
cleared = ('/127.0.0.1' in scores and (len(scores) == 1)) or not scores

snitchable_count = 0

for x in range(0, 150):
degraded_reads_before = bad_jmx.read_attribute(read_stage, 'Value')
scores_before = jmx.read_attribute(des, 'Scores')
assert no_cross_dc(scores_before, [node4, node5, node6]), "Cross DC scores were present: " + str(scores_before)
future = session.execute_async(read_stmt, [x])
future.result()
scores_after = jmx.read_attribute(des, 'Scores')
assert no_cross_dc(scores_after, [node4, node5, node6]), "Cross DC scores were present: " + str(scores_after)

if snitchable(scores_before, scores_after,
[coordinator_node, healthy_node, degraded_node]):
snitchable_count = snitchable_count + 1
# If the DES correctly routed the read around the degraded node,
# it shouldn't have another completed read request in metrics,
# unless there was one right after a reset.
degraded_reads = bad_jmx.read_attribute(read_stage, 'Value')
difference = abs(degraded_reads_before - degraded_reads)
> assert difference <= 1, "too many reads hit the degraded node: %s" % difference
E AssertionError: too many reads hit the degraded node: 5
E assert 5 <= 1

snitch_test.py:235: AssertionError
154.525
8_cythonno_x86_64_7_8test_network_topology_strategy_countersSuccess243.546
8_cythonno_x86_64_7_8test_add_write_survey_node_after_mvSuccess83.978
8_cythonno_x86_64_7_8test_replace_active_nodeSuccess91.767
8_cythonno_x86_64_7_8test_stop_decommission_too_few_replicas_multi_dcSuccess66.297
8_cythonno_x86_64_8_8test_network_topology_strategy_each_quorum_countersSuccess91.405
8_cythonno_x86_64_8_8test_complex_repairSuccess298.668
8_cythonno_x86_64_8_8test_replace_nonexistent_nodeSuccess93.522
8_cythonno_x86_64_8_8test_sstable_marking_not_intersecting_all_rangesSuccess88.177
8_cythonno_x86_64_1_8test_network_topology_strategySuccess323.274
8_cythonno_x86_64_1_8test_disk_balance_bootstrapSuccess164.198
8_cythonno_x86_64_1_8test_throttled_partition_updateSuccess593.203
8_cythonno_x86_64_1_8test_resume_failed_replaceSuccess172.010
8_cythonno_x86_64_1_8test_initial_empty_repair_tablesSkippedhangs CI

/home/cassandra/cassandra-dtest/repair_tests/repair_test.py:1416: hangs CI
0.001
8_cythonno_x86_64_2_8test_network_topology_strategy_each_quorumSuccess182.882
8_cythonno_x86_64_2_8test_add_dc_after_mv_simple_replicationSuccess96.828
8_cythonno_x86_64_2_8test_really_complex_repairSuccess258.277
8_cythonno_x86_64_2_8test_restart_failed_replace_with_reset_resume_stateSuccess184.356
8_cythonno_x86_64_2_8test_repair_parent_tableSuccess71.915
8_cythonno_x86_64_3_8test_simple_strategy_usersSuccess190.558
8_cythonno_x86_64_3_8test_add_dc_after_mv_network_replicationSuccess124.909
8_cythonno_x86_64_3_8test_replace_stopped_nodeSuccess193.983
8_cythonno_x86_64_3_8test_restart_failed_replaceSuccess262.563
8_cythonno_x86_64_3_8test_repair_tableSuccess83.838
8_cythonno_x86_64_4_8test_simple_strategy_each_quorum_usersSuccess101.838
8_cythonno_x86_64_4_8test_add_node_after_mvSuccess82.916
8_cythonno_x86_64_4_8test_replace_shutdown_nodeSuccess188.338
8_cythonno_x86_64_4_8test_rf_collapse_gossiping_property_file_snitch_multi_dcSkipped5.1 > 5.0.x

/home/cassandra/cassandra-dtest/conftest.py:468: 5.1 > 5.0.x
0.314
8_cythonno_x86_64_5_8test_network_topology_strategy_usersSuccess143.430
8_cythonno_x86_64_5_8test_add_node_after_wide_mv_with_range_deletionsSuccess88.882
8_cythonno_x86_64_5_8test_replace_stopped_node_same_addressSuccess182.218
8_cythonno_x86_64_5_8test_rf_expand_gossiping_property_file_snitch_multi_dcSkipped5.1 > 5.0.x

/home/cassandra/cassandra-dtest/conftest.py:468: 5.1 > 5.0.x
0.306
8_cythonno_x86_64_6_8test_network_topology_strategy_each_quorum_usersSuccess146.607
8_cythonno_x86_64_6_8test_add_node_after_very_wide_mvSuccess368.205
8_cythonno_x86_64_6_8test_replace_first_bootSuccess187.413
8_cythonno_x86_64_6_8test_multidatacenter_local_quorumSuccess141.410
8_cythonno_x86_64_7_8test_network_topology_strategy_countersSuccess147.330
8_cythonno_x86_64_7_8test_add_write_survey_node_after_mvSuccess71.149
8_cythonno_x86_64_7_8test_replace_active_nodeSuccess89.052
8_cythonno_x86_64_7_8test_stop_decommission_too_few_replicas_multi_dcSuccess55.568
8_cythonno_x86_64_8_8test_network_topology_strategy_each_quorum_countersSuccess87.713
8_cythonno_x86_64_8_8test_complex_repairSuccess299.686
8_cythonno_x86_64_8_8test_replace_nonexistent_nodeSuccess79.885
8_cythonno_x86_64_8_8test_sstable_marking_not_intersecting_all_rangesSuccess83.470