reconnecting to the same room, after one of the servers has gone away
(t *testing.T)
| 123 | |
| 124 | // reconnecting to the same room, after one of the servers has gone away |
| 125 | func TestMultinodeReconnectAfterNodeShutdown(t *testing.T) { |
| 126 | if testing.Short() { |
| 127 | t.SkipNow() |
| 128 | return |
| 129 | } |
| 130 | |
| 131 | for _, testRTCServicePath := range testRTCServicePaths { |
| 132 | t.Run(fmt.Sprintf("testRTCServicePath=%s", testRTCServicePath.String()), func(t *testing.T) { |
| 133 | _, s2, finish := setupMultiNodeTest("TestMultinodeReconnectAfterNodeShutdown") |
| 134 | defer finish() |
| 135 | |
| 136 | // creating room on node 1 |
| 137 | _, err := roomClient.CreateRoom(contextWithToken(createRoomToken()), &livekit.CreateRoomRequest{ |
| 138 | Name: testRoom, |
| 139 | NodeId: s2.Node().Id, |
| 140 | }) |
| 141 | require.NoError(t, err) |
| 142 | |
| 143 | // one node connecting to node 1, and another connecting to node 2 |
| 144 | c1 := createRTCClient("c1", defaultServerPort, testRTCServicePath, nil) |
| 145 | c2 := createRTCClient("c2", secondServerPort, testRTCServicePath, nil) |
| 146 | |
| 147 | waitUntilConnected(t, c1, c2) |
| 148 | stopClients(c1, c2) |
| 149 | |
| 150 | // stop s2, and connect to room again |
| 151 | s2.Stop(true) |
| 152 | |
| 153 | time.Sleep(syncDelay) |
| 154 | |
| 155 | c3 := createRTCClient("c3", defaultServerPort, testRTCServicePath, nil) |
| 156 | waitUntilConnected(t, c3) |
| 157 | }) |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | func TestMultinodeDataPublishing(t *testing.T) { |
| 162 | if testing.Short() { |
nothing calls this directly
no test coverage detected