Quarkus IT execution time savings: skip realm bootstrap when not required#48809
Quarkus IT execution time savings: skip realm bootstrap when not required#48809michalvavrik wants to merge 1 commit intokeycloak:mainfrom
Conversation
michalvavrik
commented
May 7, 2026
- Closes: Improve Quarkus integration tests execution time by skipping realm bootstrap when not required #48808
| Class | Tests | Before | After | Saved |
|---|---|---|---|---|
| ClusterConfigDistTest | 26 | 332.1s | 316.8s | 15.3s |
| FeaturesDistTest | 8 | 70.6s | 65.6s | 5.0s |
| HostnameV2DistTest | 6 | 27.0s | 25.5s | 1.5s |
| CacheEmbeddedMtlsDistTest | 5 | 21.4s | 21.4s | 0.0s |
* Closes: keycloak#48808 | Class | Tests | Before | After | Saved | |---|---|---|---|---| | ClusterConfigDistTest | 26 | 332.1s | 316.8s | 15.3s | | TracingDistTest | 19 | 110.0s | 102.0s | 8.0s | | FeaturesDistTest | 8 | 70.6s | 65.6s | 5.0s | | HostnameV2DistTest | 6 | 27.0s | 25.5s | 1.5s | | CacheEmbeddedMtlsDistTest | 5 | 21.4s | 21.4s | 0.0s | | **Total** | **64** | **561.1s** | **531.3s** | **29.8s** | Signed-off-by: Michal Vavřík <michal.vavrik@aol.com>
|
Highly related to the mechanism to inhibit the full startup in #48759 - we'll eventually need to share the approach. |
I may be wrong about this, but I think they are complementary. The one improvement by #48759 would be that if we have initialized db, we won't need liquidbase migrations which I couldn't skip here because it broke so many things. I suppose it will be possible with your PR even without this one anyway (as migrations are already done). This has really small effect, but as I spend so much time, I decided to submit it. Either we want this PR or not, fine with me either way. |
That's exactly what I mean. There will need to be a single mechanism for inhibiting the full start of the server - it's being done in exactly the same spot (after factory postInit, but before bootstrapping), for different reasons. |
|
In order of presedence, you can change the startup of keycloak with:
It may be worthing thinking about collapsing this in some way: KC_LAUNCH_MODE=test|dry_run|skip_bootstrap If we made the name move evocative it would instead be KC_LAUNCH_MODE=exit_after_start|exit_before_quarkus|exit_before_bootstrap |
this is easier for me to understand |
Right, it can be initially confusing what "test" means - especially since it's set implicitly in a couple of places. |