From 119d498bce4bf9376db8c02314c12c77d8a3d24c Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 13 Feb 2019 14:26:43 -0300 Subject: [PATCH] apply a timeout on test wait so if it hangs it fails fast --- tests/unit/stream/test_downloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/stream/test_downloader.py b/tests/unit/stream/test_downloader.py index 3acd08717..d97444c0c 100644 --- a/tests/unit/stream/test_downloader.py +++ b/tests/unit/stream/test_downloader.py @@ -98,5 +98,5 @@ class TestStreamDownloader(BlobExchangeTestBase): self.server.server_protocol_class = ChunkedServerProtocol self.server.start_server(33333, '127.0.0.1') self.assertEqual(0, len(self.client_blob_manager.completed_blob_hashes)) - await self._test_transfer_stream(10) + await asyncio.wait_for(self._test_transfer_stream(10), timeout=2) self.assertEqual(11, len(self.client_blob_manager.completed_blob_hashes))