@@ -287,12 +287,12 @@ def test_stop(self):
287
287
self .prepare_mock_changes (batches = MAX_BATCHES )
288
288
follower = ChangesFollower (self .client , db = "db" )
289
289
start = timeit .default_timer ()
290
- count = self .runner (follower , _Mode .FINITE , timeout = 5 , stop_after = 1000 )
290
+ count = self .runner (follower , _Mode .FINITE , timeout = 2 , stop_after = 1000 )
291
291
stop = timeit .default_timer () - start
292
292
except BaseException :
293
293
self .fail ("There should be no exception." )
294
294
self .assertGreaterEqual (count , 1000 , "There should be some changes." )
295
- self .assertLess (stop , 5 , "The thread should have stopped before the wait time." )
295
+ self .assertLess (stop , 2 , "The thread should have stopped before the wait time." )
296
296
297
297
@responses .activate
298
298
def test_state_error (self ):
@@ -324,7 +324,7 @@ def test_limit(self):
324
324
try :
325
325
self .prepare_mock_changes (batches = MAX_BATCHES )
326
326
follower = ChangesFollower (self .client , db = "db" , limit = limit )
327
- count = self .runner (follower , _Mode .FINITE , timeout = 3600 )
327
+ count = self .runner (follower , _Mode .FINITE , timeout = 180 )
328
328
except BaseException :
329
329
self .fail ("There should be no exception." )
330
330
self .assertEqual (
@@ -446,7 +446,7 @@ def test_start(self):
446
446
try :
447
447
self .prepare_mock_changes (batches = 3 )
448
448
follower = ChangesFollower (self .client , db = "db" )
449
- count = self .runner (follower , _Mode .LISTEN , timeout = 5 )
449
+ count = self .runner (follower , _Mode .LISTEN , timeout = 2 )
450
450
except BaseException :
451
451
self .fail ("There should be no exception." )
452
452
self .assertGreater (count , 2 * _BATCH_SIZE + 1 , "There should be some changes." )
@@ -543,7 +543,7 @@ def test_start_transient_errors_with_max_suppression_all_changes(self):
543
543
Checks that a LISTEN mode runs through transient errors
544
544
with max suppression to receive changes until stopped.
545
545
"""
546
- batches = 3
546
+ batches = 2
547
547
self .prepare_mock_changes (
548
548
batches = batches ,
549
549
errors = self .transient_errors ,
@@ -568,12 +568,12 @@ def test_stop(self):
568
568
self .prepare_mock_changes (batches = MAX_BATCHES )
569
569
follower = ChangesFollower (self .client , db = "db" )
570
570
start = timeit .default_timer ()
571
- count = self .runner (follower , _Mode .LISTEN , timeout = 5 , stop_after = 1000 )
571
+ count = self .runner (follower , _Mode .LISTEN , timeout = 2 , stop_after = 1000 )
572
572
stop = timeit .default_timer () - start
573
573
except BaseException :
574
574
self .fail ("There should be no exception." )
575
575
self .assertGreaterEqual (count , 1000 , "There should be some changes." )
576
- self .assertLess (stop , 5 , "The thread should have stopped before the wait time." )
576
+ self .assertLess (stop , 2 , "The thread should have stopped before the wait time." )
577
577
578
578
@responses .activate
579
579
def test_state_error (self ):
@@ -605,7 +605,7 @@ def test_limit(self):
605
605
try :
606
606
self .prepare_mock_changes (batches = MAX_BATCHES )
607
607
follower = ChangesFollower (self .client , db = "db" , limit = limit )
608
- count = self .runner (follower , _Mode .LISTEN , timeout = 3600 )
608
+ count = self .runner (follower , _Mode .LISTEN , timeout = 180 )
609
609
except BaseException :
610
610
self .fail ("There should be no exception." )
611
611
self .assertEqual (
0 commit comments