Skip to content

Fix OAuth2 test flakiness from Response/WebClient resource leaks#2969

Open
gnodet wants to merge 1 commit intomainfrom
fix/oauth2-response-leak
Open

Fix OAuth2 test flakiness from Response/WebClient resource leaks#2969
gnodet wants to merge 1 commit intomainfrom
fix/oauth2-response-leak

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 13, 2026

Summary

  • Close Response objects in OAuth2TestUtils.getLocation() methods using try-finally blocks to prevent HTTP connection pool exhaustion under CI load with surefire retries
  • Close WebClient instances in AuthorizationGrantTest and PublicClientTest after use to release HTTP connections
  • No functional changes — only resource cleanup additions

Test plan

  • mvn -B validate -pl systests/rs-security passes (checkstyle/PMD clean)
  • Full systests/rs-security test suite passes without flaky failures

🤖 Generated with Claude Code

…eaks

Close Response objects in OAuth2TestUtils.getLocation() methods using
try-finally blocks to prevent connection pool exhaustion under CI load.
Close WebClient instances in AuthorizationGrantTest and PublicClientTest
after use to release HTTP connections.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet force-pushed the fix/oauth2-response-leak branch from 347fa30 to 8a8ed0a Compare March 13, 2026 21:08
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.

1 participant