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:
parent
1c6be62a0b
commit
ffb4c2b601
1 changed files with 5 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue