Skip to content

fix(test): make test-parity trustworthy and fix broadcast test timing - #11

Merged
mattmattox merged 3 commits into
mainfrom
claude/test-flakes-e3c4a8
Oct 24, 2026
Merged

mattmattox merged 3 commits into
mainfrom
claude/test-flakes-e3c4a8

Conversation

@mattmattox

Copy link
Copy Markdown
Contributor

make test-parity ran into set -e on its first increment, so it failed on every run and nothing ran it. It now checks every manifest entry, and CI runs it.

Broadcast flake: the 2s clock started before node 0's create, which took 2.18s on CI. Broadcast never runs in the Go harness (both nodes on one host, only one can bind UDP 31337), so the tests now poll and log timings.

TestMultiNodeConcurrentDirectoryOps is a real bug, left unchanged. Two nodes hold the root dir's exclusive lock at once because internal/lock CAS is read-compare-write. Both rewrite the dir block and one entry is lost. On .68 (ZFS images, 4 parallel workers), 52 runs each:

Build Fails
main 8
lock PR 7
#7 head 6
main or lock PR, CAS serialized by OFD lock (experiment) 0

Fix belongs to the lock PR: confirm the CAS by re-reading after a delay.

TestWorkerQueueDeleteJob left alone (#8).

🤖 Generated with Claude Code

mattmattox and others added 3 commits October 24, 2026 10:02
`((x++))` returns status 1 when x is 0, so `set -e` killed the script on
the first scenario and `make test-parity` always failed.

The script also never checked env-only entries, read "TODO  # reason"
and "vm_only  # reason" as real values, looked up package paths under
tests/integration, and matched test names by prefix. It now strips inline
comments, resolves paths under tests/integration then the repo root,
checks go_only/vm_only entries, and fails when a manifest entry names a
test that does not exist. That found two stale broadcast test names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TestBroadcastDirectoryInvalidation and TestBroadcastInvalidationSpeed
started their 2s deadline before node 0's write. On CI the create alone
took 2.18s, so node 1 was never polled and the test failed.

Both tests now start timing after the write returns, poll for up to 15s,
and log the write and propagation times instead of asserting <500ms.
Broadcast does not run in the Go harness anyway: both nodes share one
host and only one can bind UDP 31337.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
make test-parity always failed on main and nothing ran it, so the
manifest drifted from the tests. Run it with the unit test job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattmattox
mattmattox force-pushed the claude/test-flakes-e3c4a8 branch from ae3a358 to 0233094 Compare October 24, 2026 15:02
@mattmattox
mattmattox merged commit 4dde499 into main Oct 24, 2026
6 checks passed
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.

1 participant