1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00

fix: Fix test_take_over_seeder (#3733)

The test assumed any shutdown will take not more than 1s. This doesn't
always hold, and also waiting for 1s isn't ideal because usually it
takes less than that.

Changed to use `assert_eventually` instead.

Fixes #3684
This commit is contained in:
Shahar Mike 2024-09-18 14:17:09 +03:00 committed by GitHub
parent 1c6be62a0b
commit ffb4c2b601
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1286,9 +1286,11 @@ async def test_take_over_seeder(
stop_info = True
await info_task
# Need to wait a bit to give time to write the shutdown snapshot
await asyncio.sleep(1)
assert master.proc.poll() == 0, "Master process did not exit correctly."
@assert_eventually
def assert_master_exists():
assert master.proc.poll() == 0, "Master process did not exit correctly."
assert_master_exists()
master.start()
c_master = master.client()