From 31487878bdc56f1fd55b8fdbe44ae78f39b9c0ae Mon Sep 17 00:00:00 2001 From: sukun Date: Tue, 10 Oct 2023 18:33:52 +0530 Subject: [PATCH] webrtc: add TestManyStreams to transport integration tests --- p2p/test/transport/transport_test.go | 3 --- p2p/transport/webrtc/connection.go | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/p2p/test/transport/transport_test.go b/p2p/test/transport/transport_test.go index 16e45e6a5f..d6166ce3db 100644 --- a/p2p/test/transport/transport_test.go +++ b/p2p/test/transport/transport_test.go @@ -366,9 +366,6 @@ func TestManyStreams(t *testing.T) { const streamCount = 128 for _, tc := range transportsToTest { t.Run(tc.Name, func(t *testing.T) { - if strings.Contains(tc.Name, "WebRTC") { - t.Skip("Pion doesn't correctly handle large queues of streams.") - } h1 := tc.HostGenerator(t, TransportTestCaseOpts{NoRcmgr: true}) h2 := tc.HostGenerator(t, TransportTestCaseOpts{NoListen: true, NoRcmgr: true}) defer h1.Close() diff --git a/p2p/transport/webrtc/connection.go b/p2p/transport/webrtc/connection.go index 4cf853b08d..13300f9e97 100644 --- a/p2p/transport/webrtc/connection.go +++ b/p2p/transport/webrtc/connection.go @@ -25,7 +25,8 @@ import ( var _ tpt.CapableConn = &connection{} -const maxAcceptQueueLen = 10 +// maxAcceptQueueLen is the number of waiting streams. +const maxAcceptQueueLen = 256 const maxDataChannelID = 1 << 10