16
16
import sys
17
17
import traceback
18
18
import time
19
+ from packaging .version import Version
19
20
20
- from ccmlib .dse_cluster import DseCluster
21
21
from mock import Mock
22
22
23
23
from cassandra .policies import HostFilterPolicy , RoundRobinPolicy
31
31
from tests .integration import (
32
32
use_singledc , PROTOCOL_VERSION , get_cluster , setup_keyspace , remove_cluster ,
33
33
get_node , start_cluster_wait_for_up , requiresmallclockgranularity ,
34
- local )
34
+ local , CASSANDRA_VERSION )
35
35
36
36
37
37
try :
@@ -55,7 +55,10 @@ def setup_module():
55
55
use_singledc (start = False )
56
56
ccm_cluster = get_cluster ()
57
57
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
+ }
59
62
ccm_cluster .set_configuration_options (config_options )
60
63
start_cluster_wait_for_up (ccm_cluster )
61
64
setup_keyspace ()
@@ -255,7 +258,8 @@ def test_tombstone_overflow_read_failure(self):
255
258
parameters = [(x ,) for x in range (3000 )]
256
259
self .execute_concurrent_args_helper (self .session , statement , parameters )
257
260
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 ))
259
263
parameters = [(x ,) for x in range (2001 )]
260
264
self .execute_concurrent_args_helper (self .session , statement , parameters )
261
265
0 commit comments