Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Commit

Permalink
where does it break
Browse files Browse the repository at this point in the history
  • Loading branch information
cburgdorf committed May 21, 2019
1 parent 357b955 commit c6e8303
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"plyvel==1.0.5",
"py-evm==0.2.0a42",
"web3==4.4.1",
"lahja@git+https://github.com/ethereum/lahja.git@5e7924748b90dd14874289cc0ca1ff75df8f733d",
"lahja@git+https://github.com/cburgdorf/lahja-1.git@5eb425362f660d1c44570f4b1d17fae470e24cf5",
# "lahja==0.12.0",
"termcolor>=1.1.0,<2.0.0",
"uvloop==0.11.2;platform_system=='Linux' or platform_system=='Darwin' or platform_system=='FreeBSD'", # noqa: E501
Expand Down
5 changes: 4 additions & 1 deletion tests/core/integration_test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
from eth.db.header import HeaderDB
from eth.vm.forks.byzantium import ByzantiumVM

from lahja import BaseEvent

from trinity.constants import TO_NETWORKING_BROADCAST_CONFIG
from trinity.db.base import BaseAsyncDB
from trinity.db.eth1.chain import BaseAsyncChainDB
Expand Down Expand Up @@ -189,7 +191,8 @@ async def run_peer_pool_event_server(event_bus, peer_pool, handler_type=None):
)
asyncio.ensure_future(event_server.run())
# Give event subscriptions a moment to propagate
await asyncio.sleep(0.01)
#await asyncio.sleep(0.01)
#await event_bus.wait_until_any_connection_subscribed_to(BaseEvent)
await event_server.events.started.wait()
return event_server

Expand Down
6 changes: 6 additions & 0 deletions tests/core/p2p-proto/bcc/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ async def get_request_server_setup(request, event_loop, event_bus, chain_db):
event_bus, TO_NETWORKING_BROADCAST_CONFIG, bob.context.chain_db)
asyncio.ensure_future(bob_request_server.run())

#await asyncio.sleep(0.1)
from lahja import BaseEvent
from trinity.protocol.bcc.events import GetBeaconBlocksEvent
from trinity.protocol.common.events import PeerPoolMessageEvent
await event_bus.wait_until_all_connections_subscribed_to(PeerPoolMessageEvent)

def finalizer():
event_loop.run_until_complete(bob_request_server.cancel())
event_loop.run_until_complete(event_server.cancel())
Expand Down

0 comments on commit c6e8303

Please sign in to comment.