fix reconnect test

This commit is contained in:
Jack Robison 2022-05-27 11:58:32 -04:00
parent ac7e94c6ed
commit 2313d30996
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
3 changed files with 3 additions and 3 deletions

View file

@ -348,7 +348,6 @@ class Network:
await self._keepalive_task
if self._urgent_need_reconnect.is_set():
log.warning("urgent reconnect needed")
self._urgent_need_reconnect.clear()
if self._keepalive_task and not self._keepalive_task.done():
self._keepalive_task.cancel()
except asyncio.CancelledError:

View file

@ -69,7 +69,7 @@ setup(
'jsonschema==4.4.0',
],
'hub': [
'hub@git+https://github.com/lbryio/hub.git@0901f67d89a17b403dd43aed939dd3f056af3d58'
'hub@git+https://github.com/lbryio/hub.git@76dd9c392b776a2823015762814f375794120076'
]
},
classifiers=[

View file

@ -116,7 +116,7 @@ class ReconnectTests(IntegrationTestCase):
# disconnect and send a new tx, should reconnect and get it
self.ledger.network.client.transport.close()
self.assertFalse(self.ledger.network.is_connected)
await self.ledger.resolve([], 'derp')
await self.ledger.resolve([], ['derp'])
sendtxid = await self.send_to_address_and_wait(address1, 1.1337, 1)
self.assertLess(self.ledger.network.client.response_time, 1) # response time properly set lower, we are fine
@ -139,6 +139,7 @@ class ReconnectTests(IntegrationTestCase):
if not self.ledger.network.is_connected:
await asyncio.wait_for(self.ledger.network.on_connected.first, timeout=10.0)
# omg, the burned cable still works! torba is fire proof!
await self.ledger.on_header.where(self.blockchain.is_expected_block)
await self.ledger.network.get_transaction(sendtxid)
async def test_timeout_then_reconnect(self):