Repository navigation
test(computers): the site proxy tests wait for the connections they read to be logged - #804
Open
earakely-scale wants to merge 2 commits into
Open
earakely-scale wants to merge 2 commits into
earakely-scale wants to merge 2 commits into
Conversation
…ead to be logged Three tests slept a fixed 0.3 s for the forward port's connection records, which it writes as each connection ends; the slow host's record waits out the 0.3 s upstream timeout itself, so on a loaded runner the log was read before it was written. They now wait until the records they check are there, for up to 10 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Three tests in
tst/unit/env/envs/test_computer_site_proxy.pyslept a fixed 0.3 s for the forward port to log its connections, then read stderr. The port writes each record as its connection ends, and the slow host's record first waits out the same 0.3 s upstream timeout. So on a loaded runner the log can be read before it's complete.That happened on CodeBuild for #791 (an unrelated change). In
test_both_proxies_log_a_connection_and_each_way_one_fails_in_the_same_json_lines, the forward port's log was missing itsconnectionrecord, and the other 16,989 tests passed.Change
_until_logged(capsys, count), reads stderr until the proxy has written the records the test checks, for up to 10 s.asyncio.sleep(0.3):Testing
-n 16under full CPU load, again 0 failures either way.So the evidence is the CodeBuild log and the reasoning above. The change waits for the records rather than for a fixed time, so it can only be slower when the log is late, never wrong.
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge.Summary
Three site-proxy tests now wait for expected log records instead of sleeping for a fixed time.
No new issues found in the changes since the previous review.
Reviews (2) · Last reviewed commit: "test(computers): name the site proxy tes..." · Reviewed by Greptile