forked from LBRYCommunity/lbry-sdk
loop.time is not usable on advance time, use wall time
This commit is contained in:
parent
9b3b609e40
commit
c519d4651b
1 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
import asyncio
|
||||
import time
|
||||
import unittest
|
||||
import typing
|
||||
from lbry.testcase import AsyncioTestCase
|
||||
|
@ -95,8 +96,8 @@ class TestTemporarilyLosingConnection(AsyncioTestCase):
|
|||
TIMEOUT = None # not supported as it advances time
|
||||
async def test_losing_connection(self):
|
||||
async def wait_for(check_ok, insist, timeout=20):
|
||||
start = loop.time()
|
||||
while loop.time() - start < timeout:
|
||||
start = time.time()
|
||||
while time.time() - start < timeout:
|
||||
if check_ok():
|
||||
break
|
||||
await asyncio.sleep(0)
|
||||
|
|
Loading…
Reference in a new issue