MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / TestHubUnregisterMatchingConn

Function TestHubUnregisterMatchingConn

internal/ws/hub_test.go:66–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

64}
65
66func TestHubUnregisterMatchingConn(t *testing.T) {
67 hub := NewHub()
68 defer hub.Close()
69
70 _, conn := newTestWSPair(t)
71 hub.Register("agent1", conn)
72 hub.Unregister("agent1", conn)
73
74 if hub.IsConnected("agent1") {
75 t.Fatal("expected disconnected after unregister")
76 }
77}
78
79func TestHubUnregisterNonMatchingConn(t *testing.T) {
80 hub := NewHub()

Callers

nothing calls this directly

Calls 6

CloseMethod · 0.95
RegisterMethod · 0.95
UnregisterMethod · 0.95
IsConnectedMethod · 0.95
NewHubFunction · 0.85
newTestWSPairFunction · 0.85

Tested by

no test coverage detected