fixed multi-node so signal node can start sessions
This commit is contained in:
@@ -115,10 +115,10 @@ func waitUntilConnected(t *testing.T, clients ...*client.RTCClient) {
|
||||
c := clients[i]
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
if !assert.NoError(t, c.WaitUntilConnected()) {
|
||||
t.Fatal("one or more clients could not connect")
|
||||
}
|
||||
wg.Done()
|
||||
}()
|
||||
}
|
||||
wg.Wait()
|
||||
|
||||
@@ -31,13 +31,15 @@ func TestMultiNodeRouting(t *testing.T) {
|
||||
|
||||
// one node connecting to node 1, and another connecting to node 2
|
||||
c1 := createRTCClient("c1", defaultServerPort)
|
||||
c2 := createRTCClient("c2", defaultServerPort)
|
||||
c2 := createRTCClient("c2", secondServerPort)
|
||||
waitUntilConnected(t, c1, c2)
|
||||
|
||||
// c1 publishing, and c2 receiving
|
||||
t1, err := c1.AddStaticTrack("audio/opus", "audio", "webcam")
|
||||
assert.NoError(t, err)
|
||||
defer t1.Stop()
|
||||
if t1 != nil {
|
||||
defer t1.Stop()
|
||||
}
|
||||
|
||||
withTimeout(t, "c2 should receive one track", func() bool {
|
||||
if len(c2.SubscribedTracks()) == 0 {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// a scenario with lots of clients connecting, publishing, and leaving at random periods
|
||||
func scenarioRandom(t *testing.T) {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user