deleting nonRtc rooms and fixing race when deleting rooms (#721)
This commit is contained in:
@@ -153,6 +153,18 @@ func TestMultiNodeJoinAfterClose(t *testing.T) {
|
||||
scenarioJoinClosedRoom(t)
|
||||
}
|
||||
|
||||
func TestMultiNodeCloseNonRTCRoom(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.SkipNow()
|
||||
return
|
||||
}
|
||||
|
||||
_, _, finish := setupMultiNodeTest("closeNonRTCRoom")
|
||||
defer finish()
|
||||
|
||||
closeNonRTCRoom(t)
|
||||
}
|
||||
|
||||
// ensure that token accurately reflects out of band updates
|
||||
func TestMultiNodeRefreshToken(t *testing.T) {
|
||||
_, _, finish := setupMultiNodeTest("TestMultiNodeJoinAfterClose")
|
||||
|
||||
@@ -166,6 +166,20 @@ func scenarioJoinClosedRoom(t *testing.T) {
|
||||
stopClients(c2)
|
||||
}
|
||||
|
||||
// close a room that has been created, but no participant has joined
|
||||
func closeNonRTCRoom(t *testing.T) {
|
||||
createCtx := contextWithToken(createRoomToken())
|
||||
_, err := roomClient.CreateRoom(createCtx, &livekit.CreateRoomRequest{
|
||||
Name: testRoom,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
_, err = roomClient.DeleteRoom(createCtx, &livekit.DeleteRoomRequest{
|
||||
Room: testRoom,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
func publishTracksForClients(t *testing.T, clients ...*testclient.RTCClient) []*testclient.TrackWriter {
|
||||
logger.Infow("publishing tracks for clients")
|
||||
var writers []*testclient.TrackWriter
|
||||
|
||||
@@ -340,6 +340,18 @@ func TestSingleNodeJoinAfterClose(t *testing.T) {
|
||||
scenarioJoinClosedRoom(t)
|
||||
}
|
||||
|
||||
func TestSingleNodeCloseNonRTCRoom(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.SkipNow()
|
||||
return
|
||||
}
|
||||
|
||||
_, finish := setupSingleNodeTest("closeNonRTCRoom")
|
||||
defer finish()
|
||||
|
||||
closeNonRTCRoom(t)
|
||||
}
|
||||
|
||||
func TestAutoCreate(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.SkipNow()
|
||||
|
||||
Reference in New Issue
Block a user