You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jl...@apache.org on 2024/07/24 12:36:11 UTC
(cassandra-dtest) 26/43: STAR-394: Fix various timeouts (#57)
This is an automated email from the ASF dual-hosted git repository.
jlewandowski pushed a commit to branch ds-trunk-5.0--2024-07-24
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
commit ae43e91b5209b08d4d19433d62b7efca8343946d
Author: Jacek Lewandowski <65...@users.noreply.github.com>
AuthorDate: Mon Mar 21 22:40:00 2022 +0100
STAR-394: Fix various timeouts (#57)
(cherry picked from commit adc354645eb7e7d0f49068881ef70cec183de8c7)
(cherry picked from commit c3dc2f54c63423d186e4a0864ce991518115fd0c)
(cherry picked from commit a586a26f9069a3be289f8745e3389bd7ec369a5e)
(cherry picked from commit 181ad9e4bcdb11bca0ac55d36fce2ae4aa06619f)
---
cqlsh_tests/test_cqlsh_copy.py | 9 ++++++---
dtest_setup.py | 6 ++++--
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/cqlsh_tests/test_cqlsh_copy.py b/cqlsh_tests/test_cqlsh_copy.py
index 67ea0cdc..a2e69136 100644
--- a/cqlsh_tests/test_cqlsh_copy.py
+++ b/cqlsh_tests/test_cqlsh_copy.py
@@ -123,9 +123,9 @@ class TestCqlshCopy(Tester):
if auth_enabled:
self.node1.watch_log_for('Created default superuser')
- self.session = self.patient_cql_connection(self.node1, user='cassandra', password='cassandra')
+ self.session = self.patient_cql_connection(self.node1, user='cassandra', password='cassandra', request_timeout=30.0)
else:
- self.session = self.patient_cql_connection(self.node1)
+ self.session = self.patient_cql_connection(self.node1, request_timeout=30.0)
self.session.execute('DROP KEYSPACE IF EXISTS ks')
self.ks = 'ks'
@@ -2387,6 +2387,9 @@ class TestCqlshCopy(Tester):
# enough for truncating larger tables, see CASSANDRA-11157
if 'truncate_request_timeout_in_ms' not in configuration_options:
configuration_options['truncate_request_timeout_in_ms'] = 60000
+ configuration_options['request_timeout_in_ms'] = 60000
+ configuration_options['read_request_timeout_in_ms'] = 60000
+ configuration_options['range_request_timeout_in_ms'] = 60000
self.prepare(nodes=nodes, partitioner=partitioner, configuration_options=configuration_options)
@@ -2406,7 +2409,7 @@ class TestCqlshCopy(Tester):
else:
count_statement = SimpleStatement("SELECT COUNT(*) FROM {}".format(stress_table), consistency_level=ConsistencyLevel.ALL,
retry_policy=FlakyRetryPolicy(max_retries=3))
- ret = rows_to_list(self.session.execute(count_statement))[0][0]
+ ret = rows_to_list(self.session.execute(query=count_statement, timeout=60.0))[0][0]
logger.debug('Generated {} records'.format(ret))
assert ret >= num_operations, 'cassandra-stress did not import enough records'
return ret
diff --git a/dtest_setup.py b/dtest_setup.py
index 2aa7b0f4..f5a9e808 100644
--- a/dtest_setup.py
+++ b/dtest_setup.py
@@ -256,7 +256,9 @@ class DTestSetup(object):
protocol_version=protocol_version,
port=port,
ssl_options=ssl_opts,
- connect_timeout=15,
+ connect_timeout=60,
+ idle_heartbeat_timeout=60,
+ idle_heartbeat_interval=60,
allow_beta_protocol_version=True,
execution_profiles=profiles)
session = cluster.connect(wait_for_all_pools=True)
@@ -268,7 +270,7 @@ class DTestSetup(object):
return session
def patient_cql_connection(self, node, keyspace=None,
- user=None, password=None, timeout=30, compression=True,
+ user=None, password=None, timeout=60, compression=True,
protocol_version=None, port=None, ssl_opts=None, **kwargs):
"""
Returns a connection after it stops throwing NoHostAvailables due to not being ready.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org