MCPcopy
hub / github.com/livekit/livekit / TestClientCouldConnect

Function TestClientCouldConnect

test/singlenode_test.go:60–87  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

58)
59
60func TestClientCouldConnect(t *testing.T) {
61 if testing.Short() {
62 t.SkipNow()
63 return
64 }
65
66 _, finish := setupSingleNodeTest("TestClientCouldConnect")
67 defer finish()
68
69 for _, testRTCServicePath := range testRTCServicePaths {
70 t.Run(fmt.Sprintf("testRTCServicePath=%s", testRTCServicePath.String()), func(t *testing.T) {
71 c1 := createRTCClient("c1", defaultServerPort, testRTCServicePath, nil)
72 c2 := createRTCClient("c2", defaultServerPort, testRTCServicePath, nil)
73 waitUntilConnected(t, c1, c2)
74
75 // ensure they both see each other
76 testutils.WithTimeout(t, func() string {
77 if len(c1.RemoteParticipants()) == 0 {
78 return "c1 did not see c2"
79 }
80 if len(c2.RemoteParticipants()) == 0 {
81 return "c2 did not see c1"
82 }
83 return ""
84 })
85 })
86 }
87}
88
89func TestClientConnectDuplicate(t *testing.T) {
90 if testing.Short() {

Callers

nothing calls this directly

Calls 7

WithTimeoutFunction · 0.92
setupSingleNodeTestFunction · 0.85
createRTCClientFunction · 0.85
waitUntilConnectedFunction · 0.85
RemoteParticipantsMethod · 0.80
RunMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected