Correct some resource leaks in tests.

This commit is contained in:
Dave Shawley 2021-03-10 07:16:47 -05:00
parent 4360bc298a
commit 00759ed20b
No known key found for this signature in database
GPG key ID: 44A9C9992CCFAB82

View file

@ -95,6 +95,7 @@ class ProcessorTests(ProcessorTestCase):
self.statsd_server.transports[0].close()
await self.wait_for(self.statsd_server.client_connected.acquire())
await self.wait_for(processor.stop())
async def test_connection_failures(self):
processor = statsd.Processor(host=self.statsd_server.host,
@ -115,6 +116,7 @@ class ProcessorTests(ProcessorTestCase):
processor.port = self.statsd_server.port
await self.wait_for(self.statsd_server.client_connected.acquire())
await self.wait_for(processor.stop())
async def test_that_stopping_when_not_running_is_safe(self):
processor = statsd.Processor(host=self.statsd_server.host,