8_cythonno_x86_64_5_8 | test_network_topology_strategy_users | Failure | Failed: Timeout >900.0s
self = <consistency_test.TestAccuracy object at 0x7f4b5f7f4250>
@pytest.mark.resource_intensive
def test_network_topology_strategy_users(self):
"""
Test for multiple datacenters, users table.
"""
self.nodes = [3, 3]
self.rf = OrderedDict([('dc1', 3), ('dc2', 3)])
combinations = [
(ConsistencyLevel.ALL, ConsistencyLevel.ALL),
(ConsistencyLevel.QUORUM, ConsistencyLevel.QUORUM),
(ConsistencyLevel.EACH_QUORUM, ConsistencyLevel.LOCAL_QUORUM),
(ConsistencyLevel.LOCAL_QUORUM, ConsistencyLevel.LOCAL_QUORUM),
(ConsistencyLevel.ALL, ConsistencyLevel.ONE),
(ConsistencyLevel.ONE, ConsistencyLevel.ALL),
(ConsistencyLevel.QUORUM, ConsistencyLevel.ONE),
(ConsistencyLevel.ONE, ConsistencyLevel.QUORUM),
(ConsistencyLevel.LOCAL_QUORUM, ConsistencyLevel.ONE),
(ConsistencyLevel.ONE, ConsistencyLevel.LOCAL_QUORUM),
(ConsistencyLevel.EACH_QUORUM, ConsistencyLevel.ONE),
(ConsistencyLevel.TWO, ConsistencyLevel.TWO),
(ConsistencyLevel.ONE, ConsistencyLevel.THREE),
(ConsistencyLevel.THREE, ConsistencyLevel.ONE),
(ConsistencyLevel.ANY, ConsistencyLevel.ONE),
(ConsistencyLevel.ONE, ConsistencyLevel.ONE),
(ConsistencyLevel.ONE, ConsistencyLevel.TWO),
(ConsistencyLevel.TWO, ConsistencyLevel.ONE),
(ConsistencyLevel.QUORUM, ConsistencyLevel.SERIAL, ConsistencyLevel.SERIAL),
(ConsistencyLevel.LOCAL_QUORUM, ConsistencyLevel.LOCAL_SERIAL, ConsistencyLevel.LOCAL_SERIAL),
(ConsistencyLevel.QUORUM, ConsistencyLevel.LOCAL_SERIAL, ConsistencyLevel.SERIAL),
(ConsistencyLevel.LOCAL_QUORUM, ConsistencyLevel.SERIAL, ConsistencyLevel.LOCAL_SERIAL),
]
logger.debug("Testing multiple dcs, users")
> self._run_test_function_in_parallel(TestAccuracy.Validation.validate_users, self.nodes, list(self.rf.values()), combinations),
consistency_test.py:651:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <consistency_test.TestAccuracy object at 0x7f4b5f7f4250>
valid_fcn = <function TestAccuracy.Validation.validate_users at 0x7f4b5f7dd1f0>
nodes = [3, 3], rf_factors = [3, 3]
combinations = [(5, 5), (4, 4), (7, 6), (6, 6), (5, 1), (1, 5), ...]
def _run_test_function_in_parallel(self, valid_fcn, nodes, rf_factors, combinations):
"""
Run a test function in parallel.
"""
requires_local_reads = False
for combination in combinations:
for i, _ in enumerate(nodes):
expected_consistency = self.get_expected_consistency(i, rf_factors, combination[0], combination[1])
if not expected_consistency.is_strong:
# if at least one combination does not reach strong consistency, in order to validate weak
# consistency we require local reads, see CASSANDRA-12092 for details.
requires_local_reads = True
break
if requires_local_reads:
break
self._start_cluster(save_sessions=True, requires_local_reads=requires_local_reads)
input_queue = queue.Queue()
exceptions_queue = queue.Queue()
def run():
while not input_queue.empty():
try:
v = TestAccuracy.Validation(self, self.sessions, nodes, rf_factors, *input_queue.get(block=False))
valid_fcn(v)
except queue.Empty:
pass
except Exception:
exceptions_queue.put(sys.exc_info())
start = 0
num_keys = 50
for combination in combinations:
input_queue.put((start, start + num_keys) + combination)
start += num_keys
threads = []
for n in range(0, 8):
t = threading.Thread(target=run)
t.setDaemon(True)
t.start()
threads.append(t)
logger.debug("Waiting for workers to complete")
while exceptions_queue.empty():
> time.sleep(0.1)
E Failed: Timeout >900.0s
consistency_test.py:559: Failed | 913.870 |