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 158621814905f3a04c1c93b9bded9ef543231ba3 Author: Brandon Williams <[email protected]> AuthorDate: Mon Jul 22 14:34:04 2024 -0500 CC5 fix support_guardrails() --- compaction_test.py | 4 ++-- cqlsh_tests/test_cqlsh.py | 2 +- cqlsh_tests/test_cqlsh_copy.py | 6 +++--- dtest_setup.py | 2 +- paging_test.py | 4 ++-- pushed_notifications_test.py | 4 ++-- read_failures_test.py | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/compaction_test.py b/compaction_test.py index a4e93eab..1fd5a97d 100644 --- a/compaction_test.py +++ b/compaction_test.py @@ -366,7 +366,7 @@ class TestCompaction(Tester): Check that we log a warning when the partition size is bigger than compaction_large_partition_warning_threshold_mb """ cluster = self.cluster - if self.supports_guardrails: + if self.supports_guardrails(): cluster.set_configuration_options({'guardrails': {'partition_size_warn_threshold_in_mb': 1}}) else: cluster.set_configuration_options({'compaction_large_partition_warning_threshold_mb': 1}) @@ -392,7 +392,7 @@ class TestCompaction(Tester): verb = 'Writing' if self.cluster.version() > '2.2' else 'Compacting' sizematcher = '\d+ bytes' if self.cluster.version() < LooseVersion('3.6') else '\d+\.\d{3}(K|M|G)iB' log_message = '{} large partition ks/large:user \({}'.format(verb, sizematcher) - if self.supports_guardrails: + if self.supports_guardrails(): log_message = "Detected partition 'user' in ks.large of size 2MB is greater than the maximum recommended size \(1MB\)" node.watch_log_for(log_message, from_mark=mark, timeout=180) diff --git a/cqlsh_tests/test_cqlsh.py b/cqlsh_tests/test_cqlsh.py index cb032d00..bbe13357 100644 --- a/cqlsh_tests/test_cqlsh.py +++ b/cqlsh_tests/test_cqlsh.py @@ -2089,7 +2089,7 @@ Tracing session:""") self.cluster.populate(3) config_opts = {'unlogged_batch_across_partitions_warn_threshold': str(max_partitions_per_batch)} - if self.supports_guardrails: + if self.supports_guardrails(): config_opts = {"guardrails": config_opts} self.cluster.set_configuration_options(config_opts) diff --git a/cqlsh_tests/test_cqlsh_copy.py b/cqlsh_tests/test_cqlsh_copy.py index a2e69136..2f271b6d 100644 --- a/cqlsh_tests/test_cqlsh_copy.py +++ b/cqlsh_tests/test_cqlsh_copy.py @@ -2485,7 +2485,7 @@ class TestCqlshCopy(Tester): @jira_ticket CASSANDRA-9302 """ config_opts = {'batch_size_warn_threshold_in_kb': '10'} - if self.supports_guardrails: # batch size thresholds moved to guardrails in 4.0 + if self.supports_guardrails(): # batch size thresholds moved to guardrails in 4.0 config_opts = {'guardrails': config_opts} self._test_bulk_round_trip(nodes=3, partitioner="murmur3", num_operations=10000, @@ -2504,7 +2504,7 @@ class TestCqlshCopy(Tester): """ batch_size_warn_threshold_in_kb = '10' native_transport_max_concurrent_connections = '12' - if self.supports_guardrails: # batch size thresholds moved to guardrails in 4.0 + if self.supports_guardrails(): # batch size thresholds moved to guardrails in 4.0 config_opts = {'guardrails': {'batch_size_warn_threshold_in_kb': batch_size_warn_threshold_in_kb}, 'native_transport_max_concurrent_connections': native_transport_max_concurrent_connections} else: @@ -2846,7 +2846,7 @@ class TestCqlshCopy(Tester): batch_size_fail_threshold_in_kb = '5' # with 5kb size batches config_opts = {'batch_size_warn_threshold_in_kb': batch_size_warn_threshold_in_kb, 'batch_size_fail_threshold_in_kb': batch_size_fail_threshold_in_kb} - if self.supports_guardrails: # batch size thresholds moved to guardrails in 4.0 + if self.supports_guardrails(): # batch size thresholds moved to guardrails in 4.0 config_opts = {'guardrails': config_opts} self.prepare(nodes=1, configuration_options=config_opts) diff --git a/dtest_setup.py b/dtest_setup.py index f5a9e808..1d1a1a0b 100644 --- a/dtest_setup.py +++ b/dtest_setup.py @@ -379,7 +379,7 @@ class DTestSetup(object): return cluster_version >= LooseVersion('4.0') def supports_guardrails(self): - return self.cluster.version() >= LooseVersion('4.0') + return self.cluster.version() >= LooseVersion('4.0') and self.cluster.version() < LooseVersion('5.0') def cleanup_last_test_dir(self): diff --git a/paging_test.py b/paging_test.py index 408b78ee..eaf85528 100644 --- a/paging_test.py +++ b/paging_test.py @@ -3424,7 +3424,7 @@ class TestPagingWithDeletions(BasePagingTester, PageAssertionMixin): supports_v5_protocol = self.supports_v5_protocol(self.cluster.version()) self.fixture_dtest_setup.allow_log_errors = True - if self.supports_guardrails: + if self.supports_guardrails(): config_opts = {'guardrails': {'tombstone_failure_threshold': 500, 'tombstone_warn_threshold': -1, 'write_consistency_levels_disallowed': {}}} @@ -3434,7 +3434,7 @@ class TestPagingWithDeletions(BasePagingTester, PageAssertionMixin): self.session = self.prepare() self.setup_data() - if self.supports_guardrails: + if self.supports_guardrails(): # cell tombstones are not counted towards the threshold, so we delete rows query = "delete from paging_test where id = 1 and mytext = '{}'" else: diff --git a/pushed_notifications_test.py b/pushed_notifications_test.py index 68bc6ab4..a67599fb 100644 --- a/pushed_notifications_test.py +++ b/pushed_notifications_test.py @@ -388,7 +388,7 @@ class TestVariousNotifications(Tester): self.fixture_dtest_setup.allow_log_errors = True opts={} - if self.supports_guardrails: + if self.supports_guardrails(): opts = {'guardrails': {'tombstone_warn_threshold': -1, 'tombstone_failure_threshold': 500}, 'read_request_timeout_in_ms': 30000, # 30 seconds @@ -412,7 +412,7 @@ class TestVariousNotifications(Tester): "PRIMARY KEY (id, mytext) )" ) - if self.supports_guardrails: + if self.supports_guardrails(): # cell tombstones are not counted towards the threshold, so we delete rows query = "delete from test where id = 1 and mytext = '{}'" else: diff --git a/read_failures_test.py b/read_failures_test.py index 664ca70f..8e49fe0d 100644 --- a/read_failures_test.py +++ b/read_failures_test.py @@ -36,7 +36,7 @@ class TestReadFailures(Tester): self.expected_expt = ReadFailure def _prepare_cluster(self): - if self.supports_guardrails: + if self.supports_guardrails(): self.cluster.set_configuration_options( values={'guardrails': {'tombstone_warn_threshold': -1, 'tombstone_failure_threshold': self.tombstone_failure_threshold}} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
