Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(test): add sleep after WS connect for Hub register timing

Naiyuan Qing0a5dd068b133
diff --git a/server/cmd/server/integration_test.go b/server/cmd/server/integration_test.go
index 21191d77b5..713ab2ee5b 100644
--- a/server/cmd/server/integration_test.go
+++ b/server/cmd/server/integration_test.go
@@ -717,6 +717,9 @@ func TestWebSocketIntegration(t *testing.T) {
}
defer conn.Close()
+ // Allow Hub goroutine to process the register and add client to room
+ time.Sleep(100 * time.Millisecond)
+
// Create an issue — this should trigger a WebSocket broadcast
resp := authRequest(t, "POST", "/api/issues?workspace_id="+testWorkspaceID, map[string]any{
"title": "WebSocket test issue",