Skip to content

Ensure tests clear AuthorizationServerContextHolder#18768

Merged
rwinch merged 1 commit intospring-projects:mainfrom
rwinch:clear-authorizationservercontextholder
Feb 19, 2026
Merged

Ensure tests clear AuthorizationServerContextHolder#18768
rwinch merged 1 commit intospring-projects:mainfrom
rwinch:clear-authorizationservercontextholder

Conversation

@rwinch
Copy link
Member

@rwinch rwinch commented Feb 19, 2026

There are tests that do not clear AuthorizationServerContextHolder which causes flakey tests to happen. For example, this test occasionally fails:


OAuth2AuthorizationCodeRequestAuthenticationProviderTests > authenticateWhenAuthorizationCodeRequestWithRequestUriThenReturnAuthorizationCode() FAILED
    org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationCodeRequestAuthenticationException at OAuth2AuthorizationCodeRequestAuthenticationProviderTests.java:629

@rwinch rwinch added this to the 7.0.4 milestone Feb 19, 2026
@rwinch rwinch self-assigned this Feb 19, 2026
@rwinch rwinch enabled auto-merge (rebase) February 19, 2026 21:09
@rwinch rwinch added in: build An issue in the build type: bug A general bug in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) labels Feb 19, 2026
@rwinch rwinch merged commit 0dc1aa1 into spring-projects:main Feb 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: build An issue in the build in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments