Skip to content

Commit

Permalink
tests: make test pass more reliably (can fail due to async timing)
Browse files Browse the repository at this point in the history
  • Loading branch information
SomberNight committed Nov 10, 2020
1 parent 62a6684 commit bf43035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/server/test_mempool.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ async def test_notifications(caplog):
api.txs = {hash: txs[hash] for hash in second_hashes}
# Delay the DB update
assert not in_caplog(caplog, 'waiting for DB to sync')
async with ignore_after(mempool.refresh_secs * 2):
async with ignore_after(max(mempool.refresh_secs * 2, 0.5)):
await event.wait()
assert in_caplog(caplog, 'waiting for DB to sync')
assert len(api.on_mempool_calls) == 2
Expand Down

0 comments on commit bf43035

Please sign in to comment.