Skip to content

Commit

Permalink
fix reconnect test
Browse files Browse the repository at this point in the history
  • Loading branch information
jackrobison committed May 27, 2022
1 parent ac7e94c commit 2313d30
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion lbry/wallet/network.py
Expand Up @@ -348,7 +348,6 @@ async def network_loop(self):
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:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -69,7 +69,7 @@
'jsonschema==4.4.0',
],
'hub': [
'hub@git+https://github.com/lbryio/hub.git@0901f67d89a17b403dd43aed939dd3f056af3d58'
'hub@git+https://github.com/lbryio/hub.git@76dd9c392b776a2823015762814f375794120076'
]
},
classifiers=[
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/blockchain/test_network.py
Expand Up @@ -116,7 +116,7 @@ async def test_connection_drop_still_receives_events_after_reconnected(self):
# 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

Expand All @@ -139,6 +139,7 @@ async def test_connection_drop_still_receives_events_after_reconnected(self):
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):
Expand Down

0 comments on commit 2313d30

Please sign in to comment.