fix: refining how the junit Keycloak is launched#46182
Merged
vmuzikar merged 1 commit intokeycloak:mainfrom Feb 11, 2026
Merged
fix: refining how the junit Keycloak is launched#46182vmuzikar merged 1 commit intokeycloak:mainfrom
vmuzikar merged 1 commit intokeycloak:mainfrom
Conversation
Member
michalvavrik
left a comment
There was a problem hiding this comment.
Judging by the context around modified methods and in org.keycloak.quarkus.runtime.cli.command.AbstractAutoBuildCommand, I think this change is correct. But you will need review from someone with wider context. Thanks for the fix.
a7473c5 to
fcdbac1
Compare
closes: keycloak#46160 Signed-off-by: Steve Hawkins <[email protected]>
mabartos
approved these changes
Feb 11, 2026
Contributor
mabartos
left a comment
There was a problem hiding this comment.
LGTM.
I can confirm it resolves the issue.
Contributor
Author
vmuzikar
approved these changes
Feb 11, 2026
Contributor
vmuzikar
left a comment
There was a problem hiding this comment.
Approving based on @mabartos' and @michalvavrik's reviews.
msdaly200
pushed a commit
to msdaly200/keycloak
that referenced
this pull request
Feb 13, 2026
closes: keycloak#46160 Signed-off-by: Steve Hawkins <[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.
closes: #46160
Turns out the problem wasn't with asyncExit, it was more of an issue with initSys. To prevent it from causing the start to hang and / or produce duplicate results we need to only let it have an effect for auto build commands and require it to return the built exit code.
The change to the QuarkusKeycloakSessionFactory is to address that some failed launches, such as when the hostname provider fails validation, will leave provider factories as not being cleaned up - for example BasicTimerProviderFactory starts a non-daemon thread.Limited the additional fix to just BasicTimerProviderFactory - the factory logic seems pretty fragile in terms of when close can be called - some expect postInit to have been called, while other it's just after init.