Skip to content

Commit

Permalink
webrtc: fix flaky TestMaxInFlightRequests (#2682)
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Jan 9, 2024
1 parent c6e99f1 commit c681c4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion p2p/transport/webrtc/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -698,11 +698,12 @@ func TestMaxInFlightRequests(t *testing.T) {
go func() {
defer wg.Done()
dialer, _ := getTransport(t)
ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond)
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
if _, err := dialer.Dial(ctx, ln.Multiaddr(), listeningPeer); err == nil {
success.Add(1)
} else {
t.Log("failed to dial:", err)
fails.Add(1)
}
}()
Expand Down

0 comments on commit c681c4a

Please sign in to comment.