Skip to content

chore: fix TestHttpServer test flake - #159

Merged
deansheather merged 2 commits into
mainfrom
dean/flake-603
Oct 28, 2025
Merged

deansheather merged 2 commits into
mainfrom
dean/flake-603

Conversation

@deansheather

Copy link
Copy Markdown
Collaborator

Reworks the TestHttpServer threading to:

  • Use an async method instead (so we can wait with a cancellation token)
  • Use a cancellation token while awaiting the listener to return a request
    • GetContext() doesn't take a CTS directly, so we call Task.WaitAsync(CancellationToken ct) instead
  • Adds some exception handling and discarding where necessary to ignore expected errors during shutdown

Closes coder/internal#603

Comment thread Tests.Vpn.Service/TestHttpServer.cs Resolved
@deansheather
deansheather enabled auto-merge (squash) October 28, 2025 06:08
@deansheather
deansheather merged commit e4408b8 into main Oct 28, 2025
@deansheather
deansheather deleted the dean/flake-603 branch October 28, 2025 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flake: ValidationFailureExistingFile

2 participants