more test work

This commit is contained in:
Eric Froemling 2022-03-18 22:27:03 -05:00
parent bd0f952ddf
commit 27d633eeb3
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98

View File

@ -192,8 +192,15 @@ class _Tester:
client_endpoint_ref = weakref.ref(self.client.endpoint)
del self.client._endpoint
del self.server._endpoint
assert server_endpoint_ref() is None, 'Server did not go down cleanly.'
assert client_endpoint_ref() is None, 'Client did not go down cleanly.'
for name, endpoint in [
('server', server_endpoint_ref()),
('client', client_endpoint_ref()),
]:
if endpoint is not None:
import gc
print('referrers:', gc.get_referrers(endpoint))
raise RuntimeError(f'{name} did not go down cleanly')
async def _run(self, testcall: Awaitable[None]) -> None: