@@ -7,26 +7,28 @@ def test_lock_timeout_increase_on_retry
7
7
SafePgMigrations . config . lock_timeout = 0.1 . seconds
8
8
SafePgMigrations . config . increase_lock_timeout_on_retry = true
9
9
10
- calls = calls_for_lock_timeout_migration
10
+ 2 . times do
11
+ calls = calls_for_lock_timeout_migration
11
12
12
- assert_equal [
13
- ' -> Retrying in 60 seconds...' ,
14
- ' -> Increasing the lock timeout... Currently set to 0.1' ,
15
- ' -> Lock timeout is now set to 0.325' ,
16
- ' -> Retrying now.' ,
17
- ' -> Retrying in 60 seconds...' ,
18
- ' -> Increasing the lock timeout... Currently set to 0.325' ,
19
- ' -> Lock timeout is now set to 0.55' ,
20
- ' -> Retrying now.' ,
21
- ' -> Retrying in 60 seconds...' ,
22
- ' -> Increasing the lock timeout... Currently set to 0.55' ,
23
- ' -> Lock timeout is now set to 0.775' ,
24
- ' -> Retrying now.' ,
25
- ' -> Retrying in 60 seconds...' ,
26
- ' -> Increasing the lock timeout... Currently set to 0.775' ,
27
- ' -> Lock timeout is now set to 1' ,
28
- ' -> Retrying now.' ,
29
- ] , calls [ 1 ..] . map ( &:first )
13
+ assert_equal [
14
+ ' -> Retrying in 60 seconds...' ,
15
+ ' -> Increasing the lock timeout... Currently set to 100ms' ,
16
+ ' -> Lock timeout is now set to 325ms' ,
17
+ ' -> Retrying now.' ,
18
+ ' -> Retrying in 60 seconds...' ,
19
+ ' -> Increasing the lock timeout... Currently set to 325ms' ,
20
+ ' -> Lock timeout is now set to 550ms' ,
21
+ ' -> Retrying now.' ,
22
+ ' -> Retrying in 60 seconds...' ,
23
+ ' -> Increasing the lock timeout... Currently set to 550ms' ,
24
+ ' -> Lock timeout is now set to 775ms' ,
25
+ ' -> Retrying now.' ,
26
+ ' -> Retrying in 60 seconds...' ,
27
+ ' -> Increasing the lock timeout... Currently set to 775ms' ,
28
+ ' -> Lock timeout is now set to 1s' ,
29
+ ' -> Retrying now.' ,
30
+ ] , calls [ 1 ..] . map ( &:first )
31
+ end
30
32
end
31
33
32
34
def test_no_lock_timeout_increase_on_retry_if_disabled
0 commit comments