Skip to content

test: fix two flaky integration tests#1325

Merged
bigbes merged 2 commits into
masterfrom
bigbes/fix-flaky-integration-tests-master
Jul 20, 2026
Merged

test: fix two flaky integration tests#1325
bigbes merged 2 commits into
masterfrom
bigbes/fix-flaky-integration-tests-master

Conversation

@bigbes

@bigbes bigbes commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

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

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
bigbes force-pushed the bigbes/fix-flaky-integration-tests-master branch from 226b215 to e159ce7 Compare July 17, 2026 11:53
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
bigbes force-pushed the bigbes/fix-flaky-integration-tests-master branch from 4eb712a to 5e65bbd Compare July 17, 2026 13:56
@bigbes
bigbes merged commit ead2393 into master Jul 20, 2026
32 of 33 checks passed
@bigbes
bigbes deleted the bigbes/fix-flaky-integration-tests-master branch July 20, 2026 10:37
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.

3 participants