Skip to content
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

autorelay: fix flaky TestReconnectToStaticRelays #1903

Merged
merged 5 commits into from
Nov 22, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Nits
MarcoPolo committed Nov 22, 2022
commit e7696581b03fcd39f50caeebc0638cd7d4cc93e7
4 changes: 2 additions & 2 deletions p2p/host/autorelay/autorelay_test.go
Original file line number Diff line number Diff line change
@@ -471,7 +471,7 @@ func expectDeltaInAddrUpdated(t *testing.T, addrUpdated event.Subscription, expe
for _, updatedAddr := range ev.Removed {
if updatedAddr.Action == event.Removed {
if _, err := updatedAddr.Address.ValueForProtocol(ma.P_CIRCUIT); err == nil {
delta -= 1
delta--
if delta == expectedDelta {
return
}
@@ -481,7 +481,7 @@ func expectDeltaInAddrUpdated(t *testing.T, addrUpdated event.Subscription, expe
for _, updatedAddr := range ev.Current {
if updatedAddr.Action == event.Added {
if _, err := updatedAddr.Address.ValueForProtocol(ma.P_CIRCUIT); err == nil {
delta += 1
delta++
if delta == expectedDelta {
return
}