Harden server timeout and shutdown tests - #1348
Merged
Merged
Conversation
The server may write a complete 408 response before transport shutdown wins the race. Validate that optional response instead of requiring an empty read.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1348 +/- ##
=======================================
Coverage 88.53% 88.53%
=======================================
Files 31 31
Lines 11961 11961
=======================================
Hits 10590 10590
Misses 1371 1371 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Run the active-session shutdown test over both TCP and TLS. The blocked handler keeps each connection tracked until forceclose inspects it, which removes timing-dependent project coverage.
quinnj
marked this pull request as ready for review
August 8, 2026 16:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
forcecloseinspects itRoot causes
The HTTP server writes timeout responses on a best-effort basis. The test required an empty read, but the Windows Julia prerelease job can receive the complete 408 response before transport shutdown wins the race. Both wire outcomes close the idle connection correctly.
The WebSocket server tests covered TLS connection shutdown only when cleanup lost a race. This caused project coverage to vary by two untouched lines. The active-session test now exercises both transports while its handler is deliberately blocked.
Validation
test/http_server_http1_tests.jlpassed in an isolated environmenttest/http_websocket_server_tests.jlpassed in an isolated environmentforceclosebranchesgit diff --checkpassedCo-authored by Codex