Skip to content

tests: measure probe rate cap by process wall time - #50

Merged
jaschadub merged 1 commit into
mainfrom
fix/probe-rate-test
Nov 8, 2026
Merged

jaschadub merged 1 commit into
mainfrom
fix/probe-rate-test

Conversation

@jaschadub

Copy link
Copy Markdown
Contributor

Fixes a flake in probe_non_agent_prints_empty_record_and_respects_rate seen once under a full parallel workspace run. The server thread stamped each accept, so when it was descheduled two queued connections were recorded back to back and the 80ms gap check failed even though the client had paced them.

The test now asserts the whole probe process ran for at least (N - 1) * 80ms for N connections. Load can only lengthen that, never shorten it. Sanity check: with --rate 1000 the assertion fails in 70ms, so it still guards the cap.

The server thread stamped each accept, so a descheduled thread could
record two queued connections back to back and fail the 80ms gap check
under load. The whole probe run must now last at least (N - 1) * 80ms
for N connections, which load can only lengthen.
@jaschadub
jaschadub merged commit ce3335f into main Nov 8, 2026
1 check passed
@jaschadub
jaschadub deleted the fix/probe-rate-test branch November 8, 2026 22:25
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.

2 participants