-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
identify: Fix flaky tests #1555
Conversation
Haven't done a careful review yet, but 2 things come to mind:
|
This should obviate the need for this hack as long as identify doesn't handle this notification async
No, we need to know when identify finished processing the disconnect notification |
This is basically ready, but I'm going to hold for a bit to see where #1562 ends up. If that gets merged I can remove my hack :) |
c354900
to
0ec6ab3
Compare
With the sync notifs change #1562 I could get rid of the old hack. Thanks! |
There's a failing identify tests in this run: https://github.com/libp2p/go-libp2p/runs/6696246165?check_suite_focus=true. |
I don't think those are fixed, but I'll add some logging around them since it seems the only way they fail is if |
I'm not really sure how something like https://github.com/libp2p/go-libp2p/runs/6696246165?check_suite_focus=true#step:9:923 fails since it presumably waited for identify to happen. And |
@marten-seemann I'm trying to reproduce the issues here in this branch (by rerunning ci manually), but I think if this looks good we can also merge and fix up the other flakes in another PR. This PR should help debug those flakey tests with the new logging. |
* Fix flaky timing dependent tests * Update go-libp2p-peerstore dependency * Register notifiee synchronously * Only a single connection * Remove WaitForDisconnectNotification hack since notifs are now synchronous * Add debug logging to identify tests * Close chan once
Depends on the updated version of libp2p/go-libp2p-peerstore#199. Tests will fail until that gets updated.
@marten-seemann do you have any tips on avoiding the
WaitForDisconnectNotification
hack? We need someway of knowing when things got the disconnected notification so we know when we can actually probe the address book for these tests.In draft until libp2p/go-libp2p-peerstore#199 gets merged.