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

Function TestHubClose

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

Source from the content-addressed store, hash-verified

143}
144
145func TestHubClose(t *testing.T) {
146 hub := NewHub()
147
148 _, conn := newTestWSPair(t)
149 hub.Register("agent1", conn)
150 hub.Close()
151
152 if hub.IsConnected("agent1") {
153 t.Fatal("expected no connections after close")
154 }
155}
156
157func TestHubConcurrency(t *testing.T) {
158 hub := NewHub()

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected