Skip to content

Commit 1979a48

Browse files
committed
Test fixes:
- fixing a version check in test_graph_query.py - revert guardrails prefx in test_failure_types.py - for tombstone test, delete cell in c* version < 4.0, else delete entire row
1 parent 9c0b5be commit 1979a48

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

tests/integration/advanced/graph/test_graph_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def test_profile_graph_options(self):
162162
except NoHostAvailable:
163163
self.assertTrue(DSE_VERSION >= Version("6.0"))
164164
except InvalidRequest:
165-
self.assertTrue(DSE_VERSION >= Version("5.1"))
165+
self.assertTrue(DSE_VERSION >= Version("5.0"))
166166
else:
167167
if DSE_VERSION < Version("6.8"): # >6.8 returns true
168168
self.fail("Should have risen ServerError or InvalidRequest")

tests/integration/long/test_failure_types.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import sys
1717
import traceback
1818
import time
19+
from packaging.version import Version
1920

20-
from ccmlib.dse_cluster import DseCluster
2121
from mock import Mock
2222

2323
from cassandra.policies import HostFilterPolicy, RoundRobinPolicy
@@ -31,7 +31,7 @@
3131
from tests.integration import (
3232
use_singledc, PROTOCOL_VERSION, get_cluster, setup_keyspace, remove_cluster,
3333
get_node, start_cluster_wait_for_up, requiresmallclockgranularity,
34-
local)
34+
local, CASSANDRA_VERSION)
3535

3636

3737
try:
@@ -55,7 +55,10 @@ def setup_module():
5555
use_singledc(start=False)
5656
ccm_cluster = get_cluster()
5757
ccm_cluster.stop()
58-
config_options = {'guardrails.tombstone_failure_threshold': 2000, 'guardrails.tombstone_warn_threshold': 1000}
58+
config_options = {
59+
'tombstone_failure_threshold': 2000,
60+
'tombstone_warn_threshold': 1000,
61+
}
5962
ccm_cluster.set_configuration_options(config_options)
6063
start_cluster_wait_for_up(ccm_cluster)
6164
setup_keyspace()
@@ -255,7 +258,8 @@ def test_tombstone_overflow_read_failure(self):
255258
parameters = [(x,) for x in range(3000)]
256259
self.execute_concurrent_args_helper(self.session, statement, parameters)
257260

258-
statement = self.session.prepare("DELETE FROM test3rf.test2 WHERE k = 1 AND v0 =?")
261+
column = 'v1' if CASSANDRA_VERSION < Version('4.0') else ''
262+
statement = self.session.prepare("DELETE {} FROM test3rf.test2 WHERE k = 1 AND v0 =?".format(column))
259263
parameters = [(x,) for x in range(2001)]
260264
self.execute_concurrent_args_helper(self.session, statement, parameters)
261265

0 commit comments

Comments
 (0)