e2e: fix UserLimits and UserBan test flakes#3020
Merged
Conversation
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.
61689d6 to
2da3acd
Compare
martinsander00
approved these changes
Feb 16, 2026
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/...`
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.
Summary
TestE2E_UserLimits/unicast_limit_enforcementflake:AddClientreturned beforedoublezerodwas ready — the container entrypoint starts the daemon as its last step, leaving a window where the Unix socket doesn't exist. AddWaitForDaemonReady()at the end ofAddClientso all callers get a ready daemon.TestE2E_UserBan/user-ban-ibrlflake: 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, matchingmulti_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/...