Redis Router graceful stop (#116)
* prestop and hasparticipants in interface * add prestop function to existing routers * fakerouter prestop * update protocol version * read lock * redis router graceful stop * test fix * force stop
This commit is contained in:
@@ -63,7 +63,7 @@ func setupSingleNodeTest(name string, roomName string) (*service.LivekitServer,
|
||||
panic(err)
|
||||
}
|
||||
return s, func() {
|
||||
s.Stop()
|
||||
s.Stop(true)
|
||||
logger.Infow("----------------FINISHING TEST----------------", "test", name)
|
||||
}
|
||||
}
|
||||
@@ -79,8 +79,8 @@ func setupMultiNodeTest(name string) (*service.LivekitServer, *service.LivekitSe
|
||||
waitForServerToStart(s2)
|
||||
|
||||
return s1, s2, func() {
|
||||
s1.Stop()
|
||||
s2.Stop()
|
||||
s1.Stop(true)
|
||||
s2.Stop(true)
|
||||
redisClient().FlushAll(context.Background())
|
||||
logger.Infow("----------------FINISHING TEST----------------", "test", name)
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ func TestMultinodeReconnectAfterNodeShutdown(t *testing.T) {
|
||||
stopClients(c1, c2)
|
||||
|
||||
// stop s2, and connect to room again
|
||||
s2.Stop()
|
||||
s2.Stop(true)
|
||||
|
||||
time.Sleep(syncDelay)
|
||||
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ func testTurnServer(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
go s.Start()
|
||||
waitForServerToStart(s)
|
||||
defer s.Stop()
|
||||
defer s.Stop(true)
|
||||
|
||||
time.Sleep(syncDelay)
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ func setupServerWithWebhook() (server *service.LivekitServer, testServer *webook
|
||||
waitForServerToStart(server)
|
||||
|
||||
finishFunc = func() {
|
||||
server.Stop()
|
||||
server.Stop(true)
|
||||
testServer.Stop()
|
||||
}
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user