fix(test): add sleep after WS connect for Hub register timing
The Hub processes client registration asynchronously via a channel. Without a short delay, the issue creation can fire before the client is added to the workspace room, so the broadcast has no recipients. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
77141cf0a7
commit
0a5dd068b1
1 changed files with 3 additions and 0 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue