forked from M-Labs/artiq
test: do not close/recreate the asyncio event loop (WA for asyncio bugs when multiple tests are run)
This commit is contained in:
parent
e037b930d8
commit
4ba54ac929
|
@ -74,10 +74,7 @@ class RPCCase(unittest.TestCase):
|
|||
|
||||
def _loop_asyncio_echo(self):
|
||||
loop = asyncio.get_event_loop()
|
||||
try:
|
||||
loop.run_until_complete(self._asyncio_echo())
|
||||
finally:
|
||||
loop.close()
|
||||
|
||||
def test_asyncio_echo(self):
|
||||
self._run_server_and_test(self._loop_asyncio_echo)
|
||||
|
|
|
@ -41,12 +41,8 @@ def _run_experiment(experiment):
|
|||
}
|
||||
|
||||
worker = Worker(handlers)
|
||||
loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
try:
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.run_until_complete(_call_worker(worker, run_params))
|
||||
finally:
|
||||
loop.close()
|
||||
|
||||
|
||||
class WatchdogCase(unittest.TestCase):
|
||||
|
|
Loading…
Reference in New Issue