-
Notifications
You must be signed in to change notification settings - Fork 130
Conversation
Wait for Runner to start before attempt to access advertise peer.
…e open before it returns but doesn't block until shutdown. Expose an explicit awaitStop method for callers who want to block until Pantheon exits. Fixes intermittency in RunnerTest with thanks to @usmansaleem for reporting via PegaSysEng#1067.
Thanks for reporting this and the contributed fix. While this fix would indeed work, we've recently changed the network startup to be more synchronous to try and avoid this kind of problem but didn't take the final step of exposing a synchronous call to start Would you be able to try the changes in https://github.com/ajsutton/pantheon/tree/runner-start and let me know if that fixes the issue for you please? |
@ajsutton Thank you for the feedback. Following would indeed do the trick, this was the alternate solution I had, but then I found existing code for waiting for "port files" so I copied that. I'll try it your branch today and then close my pull request.
|
It shouldn't even need that extra wait now because |
@ajsutton your branch (https://github.com/ajsutton/pantheon/tree/runner-start) build successfully in my setup. |
Awesome thank you. I'll get a PR up and hopefully get that merged soon. |
Closing as changes are/will be fixed from another contribution. |
start() guarantees ports are open before it returns but doesn't block until shutdown. Then awaitStop can be used by callers who want to block until Pantheon exits. Fixes intermittency regression in RunnerTest with thanks to @usmansaleem for reporting via #1067.
PR description
While attempting to build pantheon on a Windows machine, the
RunnerTest.fastSyncFromGenesis
was constantly failing atfinal Peer advertisedPeer = runnerAhead.getAdvertisedPeer().get();
because Runner isn't initialized completely. It is fixed by using same logic astech.pegasys.pantheon.tests.acceptance.dsl.node.PantheonNodeRunner#waitForPortsFile
Fixed Issue(s)
Wait for Runner to start before attempt to access advertise peer.