Fix race condition with Transport negotiations

This commit is contained in:
David Zhao
2021-06-04 12:26:23 -07:00
parent bf281b1994
commit c510ea2e1a
8 changed files with 78 additions and 55 deletions

View File

@@ -4,6 +4,7 @@ import (
"testing"
"time"
"github.com/livekit/livekit-server/pkg/testutils"
livekit "github.com/livekit/livekit-server/proto"
"github.com/stretchr/testify/require"
)
@@ -35,7 +36,7 @@ func TestMultiNodeRouting(t *testing.T) {
defer t1.Stop()
}
withTimeout(t, "c2 should receive one track", func() bool {
testutils.WithTimeout(t, "c2 should receive one track", func() bool {
if len(c2.SubscribedTracks()) == 0 {
return false
}