From 2a0089a4dd29cafe7cc13eacff813e95a42eb738 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Fri, 11 Sep 2020 14:16:11 -0300 Subject: [PATCH] test starting and waiting normally as before too --- tests/integration/blockchain/test_blockchain.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/integration/blockchain/test_blockchain.py b/tests/integration/blockchain/test_blockchain.py index 9e9acfdc9..9494015aa 100644 --- a/tests/integration/blockchain/test_blockchain.py +++ b/tests/integration/blockchain/test_blockchain.py @@ -304,7 +304,7 @@ class TestLbrycrdAPIs(AsyncioTestCase): # lbrycrdr started without zmq await chain.start() - with self.assertRaises(LbrycrdEventSubscriptionError): + with self.assertRaises(LbrycrdMisconfigurationError): await chain.ensure_subscribable() await chain.stop() @@ -613,7 +613,7 @@ class TestMultiBlockFileSyncing(BasicBlockchainTestCase): class TestGeneralBlockchainSync(SyncingBlockchainTestCase): - async def test_sync_exits_if_zmq_is_misconfigured(self): + async def test_sync_waits_for_lbrycrd_to_start_but_exits_if_zmq_misconfigured(self): await self.sync.stop() await self.chain.stop() sync_start = asyncio.create_task(self.sync.start()) @@ -623,6 +623,13 @@ class TestGeneralBlockchainSync(SyncingBlockchainTestCase): with self.assertRaises(LbrycrdMisconfigurationError): await asyncio.wait_for(sync_start, timeout=10) + await self.chain.stop() + await self.sync.stop() + sync_start = asyncio.create_task(self.sync.start()) + await self.chain.start('-zmqpubhashblock=tcp://127.0.0.1:29005') + await sync_start + self.assertTrue(sync_start.done()) + async def test_sync_advances(self): blocks = [] self.sync.on_block.listen(blocks.append)