test: fix two flaky integration tests#1325
Merged
Merged
Conversation
Both tests raced a deadline that a loaded CI runner could blow past, and both failed in a way that pointed away from the actual cause. check_restart discarded the result of wait_pid_files_changed, and wait_event reports a timeout by returning False. Once the 5s wait expired the test carried on regardless and asserted on a PID file that was not written yet, which surfaces as a bare 'NOT RUNNING' == 'RUNNING' rather than as the timeout it is. Assert the wait and give it 30s; a restart that is merely slow no longer fails, and one that is genuinely stuck now names wait_pid_files_changed instead of the status check ten lines below. The cluster auth tests published to a live endpoint with ?timeout=0.1 while asserting on a server-side auth error, so the 100ms deadline raced the server's reply and won often enough to fail: the assert then compared against 'context deadline exceeded'. These are the only live-endpoint callers still on 0.1 -- the rest of the cluster suite already uses timeout=5 -- so this brings them in line. The unreachable-host cases keep their short timeout, where a fast deadline is the point. Related to TNTP-8611
bigbes
force-pushed
the
bigbes/fix-flaky-integration-tests-master
branch
from
July 17, 2026 11:53
226b215 to
e159ce7
Compare
The go-format pre-commit hook runs gofumpt -extra, which strips a blank line opening a function body. Stop() picked one up, so the hook rewrites the file and static-code-check fails. The hook runs over --all-files, so this fails every branch regardless of what it touches, not just the one that introduced it. Follows #1320
bigbes
force-pushed
the
bigbes/fix-flaky-integration-tests-master
branch
from
July 17, 2026 13:56
4eb712a to
5e65bbd
Compare
sssciel
approved these changes
Jul 20, 2026
patapenka-alexey
approved these changes
Jul 20, 2026
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.
Two integration tests raced a deadline that a loaded CI runner could blow
past. Both were observed failing on unrelated PRs, and both re-ran green on
an unchanged tree, so neither was a real product failure.
Related to TNTP-8611