test/cql-pytest: test_select_from_mutation_fragments: bump timeout for slow test
The test test_many_partitions is very slow, as it tests a slow scan over a lot of partitions. This was observed to time out on the slower ARM machines, making the test flaky. To prevent this, create an extra-patient cql connection with a 10 minutes timeout for the scan itself. Fixes: #16145 Closes scylladb/scylladb#16303
This commit is contained in:
@@ -182,7 +182,11 @@ def test_many_partition_scan(cql, test_keyspace, scylla_only):
|
||||
requests.post(f'{nodetool.rest_api_url(cql)}/system/drop_sstable_caches')
|
||||
|
||||
# the real test here is that this scan completes without problems
|
||||
res_all = list(cql.execute(f"SELECT pk, mutation_source, mutation_fragment_kind, metadata FROM MUTATION_FRAGMENTS({test_table});"))
|
||||
# since this scan is very slow, we create an extra patient cql connection,
|
||||
# with an abundant 10 minutes timeout
|
||||
ep = cql.hosts[0].endpoint
|
||||
with util.cql_session(ep.address, ep.port, False, 'cassandra', 'cassandra', 600) as patient_cql:
|
||||
res_all = list(patient_cql.execute(f"SELECT pk, mutation_source, mutation_fragment_kind, metadata FROM MUTATION_FRAGMENTS({test_table});"))
|
||||
|
||||
actual_partitions = []
|
||||
for r in res_all:
|
||||
|
||||
@@ -159,7 +159,7 @@ def new_secondary_index(cql, table, column, name='', extra=''):
|
||||
|
||||
# Helper function for establishing a connection with given username and password
|
||||
@contextmanager
|
||||
def cql_session(host, port, is_ssl, username, password):
|
||||
def cql_session(host, port, is_ssl, username, password, request_timeout=120):
|
||||
profile = ExecutionProfile(
|
||||
load_balancing_policy=RoundRobinPolicy(),
|
||||
consistency_level=ConsistencyLevel.LOCAL_QUORUM,
|
||||
@@ -169,7 +169,7 @@ def cql_session(host, port, is_ssl, username, password):
|
||||
# very slow debug build running on a very busy machine and a very slow
|
||||
# request (e.g., a DROP KEYSPACE needing to drop multiple tables)
|
||||
# 10 seconds may not be enough, so let's increase it. See issue #7838.
|
||||
request_timeout = 120)
|
||||
request_timeout=request_timeout)
|
||||
if is_ssl:
|
||||
# Scylla does not support any earlier TLS protocol. If you try,
|
||||
# you will get mysterious EOF errors (see issue #6971) :-(
|
||||
|
||||
Reference in New Issue
Block a user