MCPcopy
hub / github.com/livekit/livekit / waitUntilConnected

Function waitUntilConnected

test/integration_helpers.go:134–150  ·  view source on GitHub ↗
(t *testing.T, clients ...*testclient.RTCClient)

Source from the content-addressed store, hash-verified

132}
133
134func waitUntilConnected(t *testing.T, clients ...*testclient.RTCClient) {
135 logger.Infow("waiting for clients to become connected")
136 wg := sync.WaitGroup{}
137 for i := range clients {
138 c := clients[i]
139 wg.Go(func() {
140 err := c.WaitUntilConnected(5 * time.Second)
141 if err != nil {
142 t.Error(err)
143 }
144 })
145 }
146 wg.Wait()
147 if t.Failed() {
148 t.FailNow()
149 }
150}
151
152func ensureNotConnected(t *testing.T, clients ...*testclient.RTCClient) {
153 logger.Infow("checking if clients connect")

Callers 15

TestAgentsFunction · 0.85
TestAgentNamespacesFunction · 0.85
TestAgentMultiNodeFunction · 0.85
scenarioDataPublishFunction · 0.85
scenarioJoinClosedRoomFunction · 0.85
TestWebhooksFunction · 0.85
TestMultiNodeRoutingFunction · 0.85

Calls 1

WaitUntilConnectedMethod · 0.80

Tested by 15

TestAgentsFunction · 0.68
TestAgentNamespacesFunction · 0.68
TestAgentMultiNodeFunction · 0.68
TestWebhooksFunction · 0.68
TestMultiNodeRoutingFunction · 0.68
TestMultiNodeDataBlobFunction · 0.68