test: fix the two flaky integration tests - #33
Merged
Merged
Conversation
`successful_login_decays_subnet_failure_counter` failed about one run in a hundred. The test client's PoW grinder gave up after 10M nonces, and at difficulty 21 (mean 2^21 tries, geometric) that cap is hit with probability e^-4.77. The cap is now 32 times the mean, and a difficulty above 26 is refused up front as a misconfiguration. `drain_drops_row_after_max_attempts` raced the server's own outbox drain, which ticks every 10s: when the tick claimed the due row first, the test's pass found nothing and the row was still leased at the assertion. `TestApp::drain_outbox` makes a forwarder's rows due, drives a pass and waits until each row has been attempted, whichever drain claimed it. All four outbox tests use it. The outbox tests also reach the loopback receiver now; before, their 500s came from the SSRF guard refusing it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
successful_login_decays_subnet_failure_counter(about 1 run in 100)drain_drops_row_after_max_attemptsdrain_oncefound nothing, and at the assertion the row was still leased mid-delivery.TestApp::drain_outbox(forwarder_id). It makes the forwarder's rows due, drives one pass, then waits until each row has been attempted (delivered, dropped, or rescheduled with one more attempt), whichever drain claimed it.webhook_signature.rs.Test plan
-D warnings)webhook_outbox+webhook_signature×5,auth_pow×3: all green🤖 Generated with Claude Code