Repository navigation
test(launchx): fix the flaky open-tab test - #20
Merged
Merged
Conversation
an_open_tab_is_found_through_the_run_file failed most runs of the full
suite. Its stand-in server read the request with one read(), answered, and
closed. The client may send the headers and the {} body in separate writes;
closing with the body unread made the kernel reset the connection, so the
client got the 200 status line and then "Peer disconnected" reading the
body, and focus_open_tab returned false. It showed only under load.
The stand-in now reads the headers and the Content-Length body before it
answers, like one_shot_server in commands/browser.rs. The code under test is
unchanged. The full suite passed 10 of 10 runs (it failed 6 of 8 before).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
launchx::tests::an_open_tab_is_found_through_the_run_file(from #18) failed most runs of the full Rust suite.Cause: its stand-in server read the request with one
read(), answered, and closed. The client may send the headers and the{}body in separate writes. Closing with the body still unread made the kernel reset the connection, so the client got the200status line and then "Peer disconnected" while reading the body, andfocus_open_tabreturned false. It showed up only under load, so the test passed when run alone.Fix: the stand-in now reads the headers and the
Content-Lengthbody before it answers, likeone_shot_serverincommands/browser.rs. Only the test changes;focus_open_tabis unchanged.This was pushed to #19 after that PR had already merged, so it never reached
main.Testing
main), plus the golden suite.🤖 Generated with Claude Code