MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / cancelAndRestore

Function cancelAndRestore

internal/bridge/bridge_e2e_test.go:16–20  ·  view source on GitHub ↗

cancelAndRestore cancels the bridge and waits for goroutines to drain before restoring the global manager.

(b *Bridge, origGlobal *sessions.Manager)

Source from the content-addressed store, hash-verified

14// cancelAndRestore cancels the bridge and waits for goroutines to drain
15// before restoring the global manager.
16func cancelAndRestore(b *Bridge, origGlobal *sessions.Manager) {
17 b.cancel()
18 time.Sleep(100 * time.Millisecond) // let goroutines react to cancel
19 swapGlobalManager(origGlobal)
20}
21
22func TestE2E_Checkin_SessionMetadata(t *testing.T) {
23 srv, rpcClient, cleanup := startTestServer(t)

Calls 1

swapGlobalManagerFunction · 0.85

Tested by

no test coverage detected