Skip to content

Commit

Permalink
quic: fix flaky holepunching test
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Apr 22, 2022
1 parent 5151d4b commit 0e56661
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions p2p/transport/quic/conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,10 @@ func TestHolePunching(t *testing.T) {
require.NoError(t, err)
connChan <- conn
}()
// Make sure the server role (the dial on t2) has progressed far enough.
// If it hasn't created the hole punch map entry, the connection will be accepted as a regular connection,
// which would make this test fail.
time.Sleep(25 * time.Millisecond)
conn1, err := t1.Dial(
network.WithSimultaneousConnect(context.Background(), true, ""),
ln2.Multiaddr(),
Expand Down

0 comments on commit 0e56661

Please sign in to comment.