Repository navigation
test(oauthlogin): reuse probe callback connection - #2636
Merged
Merged
Conversation
Keep sequential unauthenticated probes and the valid callback on one test-owned keepalive client so server-side connection-close ordering does not accidentally exercise the listener concurrency cap. Preserve the request budget and connection-shedding tests. Refs #2327 Co-authored-by: Mecatl <[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
TestUnauthenticatedProbeFloodDoesNotAbortValidCallbackone test-owned keepalive loopback client for its sequential wrong-path probes, forged-Host probes, and final valid callback.Reading/closing a non-keepalive response does not synchronize with server-side connection closure and limiter-slot release. Opening a fresh connection for every sequential probe can therefore test connection shedding accidentally instead of the intended route/Host attempt-budget invariant. Reusing a connection removes that unrelated lifecycle race without retries, sleeps, or relaxed limits.
Refs #2327 (OAuth probe connection-lifecycle item; umbrella remains open).
Verification
-count=500 -cpu=1,8(1,000 executions): passed.-race -count=100 -cpu=1,8: passed.task test: passed.task lint: passed, zero issues across all modules.task test:race: passed.go run ./cmd/mecademo: passed; observed real tool calls/results, permission ask/approval, and final result.Stress-run caveat
The original non-keepalive test passed 500 repetitions; a subsequent 5,000-repetition baseline attempt saturated the host's 262,144-entry conntrack table. Failures during that saturation are not evidence of the callback-limiter race. The table drained naturally; no host settings or entries were changed. A bounded comparison after recovery measured +799 entries for 800 fresh connections versus +50 entries for 3,250 probe-test requests over 50 keepalive connections. Further stress was bounded to avoid repeating the host-wide resource exhaustion.
API compatibility
Test-only change. No production behavior, wire contract, API major, feature identifiers, Go public API, or stored-data format changes; no upgrade implications.