forked from LBRYCommunity/lbry-sdk
test starting and waiting normally as before too
This commit is contained in:
parent
d6bcbd631f
commit
2a0089a4dd
1 changed files with 9 additions and 2 deletions
|
@ -304,7 +304,7 @@ class TestLbrycrdAPIs(AsyncioTestCase):
|
||||||
|
|
||||||
# lbrycrdr started without zmq
|
# lbrycrdr started without zmq
|
||||||
await chain.start()
|
await chain.start()
|
||||||
with self.assertRaises(LbrycrdEventSubscriptionError):
|
with self.assertRaises(LbrycrdMisconfigurationError):
|
||||||
await chain.ensure_subscribable()
|
await chain.ensure_subscribable()
|
||||||
await chain.stop()
|
await chain.stop()
|
||||||
|
|
||||||
|
@ -613,7 +613,7 @@ class TestMultiBlockFileSyncing(BasicBlockchainTestCase):
|
||||||
|
|
||||||
|
|
||||||
class TestGeneralBlockchainSync(SyncingBlockchainTestCase):
|
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.sync.stop()
|
||||||
await self.chain.stop()
|
await self.chain.stop()
|
||||||
sync_start = asyncio.create_task(self.sync.start())
|
sync_start = asyncio.create_task(self.sync.start())
|
||||||
|
@ -623,6 +623,13 @@ class TestGeneralBlockchainSync(SyncingBlockchainTestCase):
|
||||||
with self.assertRaises(LbrycrdMisconfigurationError):
|
with self.assertRaises(LbrycrdMisconfigurationError):
|
||||||
await asyncio.wait_for(sync_start, timeout=10)
|
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):
|
async def test_sync_advances(self):
|
||||||
blocks = []
|
blocks = []
|
||||||
self.sync.on_block.listen(blocks.append)
|
self.sync.on_block.listen(blocks.append)
|
||||||
|
|
Loading…
Reference in a new issue