Skip to content

e2e: fix UserLimits and UserBan test flakes#3020

Merged
snormore merged 1 commit intomainfrom
snor/fix-user-limits-ban-flakes
Feb 16, 2026
Merged

e2e: fix UserLimits and UserBan test flakes#3020
snormore merged 1 commit intomainfrom
snor/fix-user-limits-ban-flakes

Conversation

@snormore
Copy link
Contributor

@snormore snormore commented Feb 16, 2026

Summary

  • Fix TestE2E_UserLimits/unicast_limit_enforcement flake: AddClient returned before doublezerod was ready — the container entrypoint starts the daemon as its last step, leaving a window where the Unix socket doesn't exist. Add WaitForDaemonReady() at the end of AddClient so all callers get a ready daemon.
  • Fix TestE2E_UserBan/user-ban-ibrl flake: cross-exchange client route checks used 60s/1s (timeout/poll), but the full propagation path (device iBGP → client daemon → kernel route install) can exceed 60s on CI. Increase to 120s/5s, matching multi_client_ibrl_test.go.

Failures observed in https://github.com/malbeclabs/doublezero/actions/runs/22078692369 (shards 3 and 6).

Testing Verification

  • go test -tags e2e -run TestE2E_UserLimits -v -count=1 ./e2e/...
  • go test -tags e2e -run TestE2E_UserBan -v -count=1 ./e2e/...

UserLimits: AddClient returns as soon as the container is running, but
the entrypoint starts doublezerod as its last step — the Unix socket
may not exist yet. Add WaitForDaemonReady() to Client and call it at
the end of AddClient so every caller gets a ready daemon.

UserBan: cross-exchange client route checks used 60s/1s timeout/poll,
but the full propagation path (device iBGP → client daemon → kernel
route) can exceed 60s on CI. Increase to 120s/5s, matching the pattern
in multi_client_ibrl_test.go for the same scenario.
@snormore snormore force-pushed the snor/fix-user-limits-ban-flakes branch from 61689d6 to 2da3acd Compare February 16, 2026 22:49
@snormore snormore marked this pull request as ready for review February 16, 2026 23:32
@snormore snormore enabled auto-merge (squash) February 16, 2026 23:37
@snormore snormore merged commit f847021 into main Feb 16, 2026
30 checks passed
@snormore snormore deleted the snor/fix-user-limits-ban-flakes branch February 16, 2026 23:38
nikw9944 pushed a commit that referenced this pull request Feb 17, 2026
## Summary
- Fix `TestE2E_UserLimits/unicast_limit_enforcement` flake: `AddClient`
returned before `doublezerod` was ready — the container entrypoint
starts the daemon as its last step, leaving a window where the Unix
socket doesn't exist. Add `WaitForDaemonReady()` at the end of
`AddClient` so all callers get a ready daemon.
- Fix `TestE2E_UserBan/user-ban-ibrl` flake: cross-exchange client route
checks used 60s/1s (timeout/poll), but the full propagation path (device
iBGP → client daemon → kernel route install) can exceed 60s on CI.
Increase to 120s/5s, matching `multi_client_ibrl_test.go`.

Failures observed in
https://github.com/malbeclabs/doublezero/actions/runs/22078692369
(shards 3 and 6).

## Testing Verification
- `go test -tags e2e -run TestE2E_UserLimits -v -count=1 ./e2e/...`
- `go test -tags e2e -run TestE2E_UserBan -v -count=1 ./e2e/...`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments