Skip to content

flake: TestClientAndConnectionError (windows error string mismatch) #1497

@flake-investigator

Description

@flake-investigator

CI Failure Details

CI Run: https://github.com/coder/coder/actions/runs/24883580379
Failed Job: https://github.com/coder/coder/actions/runs/24883580379/job/72857883502 (test-go-pg windows-2022)
Commit: acbdb2728e2f57c8b1b30c4c0098a260e0f7e8b5 (Paweł Banaszewski)
Date: 2026-04-24

Failing Test

TestClientAndConnectionError/* in aibridge/internal/integrationtest/responses_test.go

Error Output

=== FAIL: aibridge/internal/integrationtest TestClientAndConnectionError/streaming_connection_refused (0.00s)
Error: "Post \"http://127.0.0.1:49942/responses\": read tcp 127.0.0.1:50598->127.0.0.1:49942: wsarecv: An existing connection was forcibly closed by the remote host." does not contain "connection reset by peer"

=== FAIL: aibridge/internal/integrationtest TestClientAndConnectionError/blocking_connection_refused (0.00s)
Error: "Post \"http://127.0.0.1:49941/responses\": read tcp 127.0.0.1:50600->127.0.0.1:49941: wsarecv: An existing connection was forcibly closed by the remote host." does not contain "connection reset by peer"

Error Analysis

The test hardcodes errContains: "connection reset by peer" for both streaming and blocking cases (around line ~611). On Windows, the TCP reset error string is wsarecv: An existing connection was forcibly closed by the remote host, so the assertion fails.

No data-race warnings, panics, or OOM indicators were observed in the failing log tail.

Root Cause Assessment

OS-specific error message mismatch. The test expects a Unix error string that doesn't appear on Windows. Accepting platform-specific variants or matching on a more stable error class would fix this.

Assignment Analysis

Blame target:

  • git blame -L 606,618 aibridge/internal/integrationtest/responses_test.go

Recent file history (proxy due to tool constraints):

  • git log --oneline -10 --follow aibridge/internal/integrationtest/responses_test.go
    • e00e8576 chore: move aibridge library code into coder repo (Paweł Banaszewski)

Assigning to the most recent maintainer of this test file.

Related Issues

None found in coder/internal.

Reproduction

go test ./aibridge/internal/integrationtest -run TestClientAndConnectionError -count=1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions