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

Method waitWSConnected

tests/contract/contract_test.go:129–140  ·  view source on GitHub ↗
(t *testing.T, agentID string)

Source from the content-addressed store, hash-verified

127}
128
129func (e *testEnv) waitWSConnected(t *testing.T, agentID string) {
130 t.Helper()
131 deadline := time.After(2 * time.Second)
132 for !e.wsHub.IsConnected(agentID) {
133 select {
134 case <-deadline:
135 t.Fatalf("timed out waiting for agent %s to register in WS hub", agentID)
136 default:
137 time.Sleep(10 * time.Millisecond)
138 }
139 }
140}
141
142func (e *testEnv) waitWSDisconnected(t *testing.T, agentID string) {
143 t.Helper()

Callers 1

execWSConnectMethod · 0.80

Calls 1

IsConnectedMethod · 0.80

Tested by

no test coverage detected