MCPcopy
hub / github.com/livekit/livekit / setupMultiNodeTestWithConfig

Function setupMultiNodeTestWithConfig

test/integration_helpers.go:86–102  ·  view source on GitHub ↗
(name string, configUpdater func(*config.Config))

Source from the content-addressed store, hash-verified

84}
85
86func setupMultiNodeTestWithConfig(name string, configUpdater func(*config.Config)) (*service.LivekitServer, *service.LivekitServer, func()) {
87 logger.Infow("----------------STARTING TEST----------------", "test", name)
88 s1 := createMultiNodeServer(guid.New(nodeID1), defaultServerPort, configUpdater)
89 s2 := createMultiNodeServer(guid.New(nodeID2), secondServerPort, configUpdater)
90 go s1.Start()
91 go s2.Start()
92
93 waitForServerToStart(s1)
94 waitForServerToStart(s2)
95
96 return s1, s2, func() {
97 s1.Stop(true)
98 s2.Stop(true)
99 redisClient().FlushAll(context.Background())
100 logger.Infow("----------------FINISHING TEST----------------", "test", name)
101 }
102}
103
104func contextWithToken(token string) context.Context {
105 header := make(http.Header)

Callers 2

setupMultiNodeTestFunction · 0.85
TestMultiNodeDataBlobFunction · 0.85

Calls 5

createMultiNodeServerFunction · 0.85
waitForServerToStartFunction · 0.85
redisClientFunction · 0.70
StartMethod · 0.65
StopMethod · 0.65

Tested by 1

TestMultiNodeDataBlobFunction · 0.68