mirror of https://github.com/MagicStack/uvloop.git
Make a GC test more reliable.
This commit is contained in:
parent
ec50b7c4a2
commit
c40e8a2297
|
@ -714,7 +714,12 @@ class Test_UV_TCP(_TestTCP, tb.UVTestCase):
|
||||||
with self.assertWarnsRegex(ResourceWarning, rx):
|
with self.assertWarnsRegex(ResourceWarning, rx):
|
||||||
self.loop.create_task(run())
|
self.loop.create_task(run())
|
||||||
self.loop.run_until_complete(srv.wait_closed())
|
self.loop.run_until_complete(srv.wait_closed())
|
||||||
|
|
||||||
|
srv = None
|
||||||
gc.collect()
|
gc.collect()
|
||||||
|
gc.collect()
|
||||||
|
gc.collect()
|
||||||
|
|
||||||
self.loop.run_until_complete(asyncio.sleep(0.1, loop=self.loop))
|
self.loop.run_until_complete(asyncio.sleep(0.1, loop=self.loop))
|
||||||
|
|
||||||
# Since one TCPTransport handle wasn't closed correctly,
|
# Since one TCPTransport handle wasn't closed correctly,
|
||||||
|
|
Loading…
Reference in New Issue