Skip to content

Commit cb101ac

Browse files
committed
Fix race in test_request_during_failover.
1 parent f6a0686 commit cb101ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/high_availability/test_ha.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -992,9 +992,10 @@ def test_request_during_failover(self):
992992

993993
# Fail over
994994
ha_tools.kill_primary()
995+
sleep(5)
996+
995997
patience_seconds = 60
996998
for _ in range(patience_seconds):
997-
sleep(1)
998999
try:
9991000
if ha_tools.ha_tools_debug:
10001001
print 'Waiting for failover'
@@ -1003,6 +1004,8 @@ def test_request_during_failover(self):
10031004
break
10041005
except ConnectionFailure:
10051006
pass
1007+
1008+
sleep(1)
10061009
else:
10071010
self.fail("Problem with test: No new primary after %s seconds"
10081011
% patience_seconds)

0 commit comments

Comments
 (0)