File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ def tearDown(self):
220220 drop_table (TestMultiKeyModel )
221221 drop_table (CounterBatchQueryModel )
222222
223- @execute_count (6 )
223+ @execute_count (4 )
224224 def test_cassandra_batch_type (self ):
225225 """
226226 Tests the different types of `class: cassandra.query.BatchType`
@@ -239,15 +239,6 @@ def test_cassandra_batch_type(self):
239239 obj = TestMultiKeyModel .objects (partition = 1 )
240240 self .assertEqual (2 , len (obj ))
241241
242- with BatchQuery (batch_type = cassandra_BatchType .COUNTER ) as b :
243- CounterBatchQueryModel .batch (b ).create (k = 1 , v = 1 )
244- CounterBatchQueryModel .batch (b ).create (k = 1 , v = 2 )
245- CounterBatchQueryModel .batch (b ).create (k = 1 , v = 10 )
246-
247- obj = CounterBatchQueryModel .objects (k = 1 )
248- self .assertEqual (1 , len (obj ))
249- self .assertEqual (obj [0 ].v , 13 )
250-
251242 with BatchQuery (batch_type = cassandra_BatchType .LOGGED ) as b :
252243 TestMultiKeyModel .batch (b ).create (partition = 1 , cluster = 1 )
253244 TestMultiKeyModel .batch (b ).create (partition = 1 , cluster = 2 )
Original file line number Diff line number Diff line change 2828from uuid import uuid4
2929from cassandra .cqlengine import columns
3030from cassandra .cqlengine .connection import get_session
31- from tests .integration import CASSANDRA_VERSION , greaterthancass20
31+ from tests .integration import CASSANDRA_VERSION
3232
3333
3434class BaseTTLTest (BaseCassEngTestCase ):
Original file line number Diff line number Diff line change @@ -358,10 +358,12 @@ def test_driver_recovers_nework_isolation(self):
358358 listener = TrackDownListener ()
359359
360360 cluster = Cluster (['127.0.0.1' ],
361- load_balancing_policy = RoundRobinPolicy (),
362361 idle_heartbeat_timeout = idle_heartbeat_timeout ,
363362 idle_heartbeat_interval = idle_heartbeat_interval ,
364- executor_threads = 16 )
363+ executor_threads = 16 ,
364+ execution_profiles = {
365+ EXEC_PROFILE_DEFAULT : ExecutionProfile (load_balancing_policy = RoundRobinPolicy ())}
366+ )
365367 session = cluster .connect (wait_for_all_pools = True )
366368
367369 cluster .register_listener (listener )
Original file line number Diff line number Diff line change @@ -384,6 +384,8 @@ def test_setting_retry_policy_to_statement(self):
384384
385385 def set_cluster (self , retry_policy ):
386386 self .cluster = Cluster (protocol_version = PROTOCOL_VERSION , compression = False ,
387- default_retry_policy = retry_policy )
387+ execution_profiles = {
388+ EXEC_PROFILE_DEFAULT : ExecutionProfile (retry_policy = retry_policy )}
389+ )
388390 self .session = self .cluster .connect (wait_for_all_pools = True )
389391 self .addCleanup (self .cluster .shutdown )
You can’t perform that action at this time.
0 commit comments