diff --git a/pom.xml b/pom.xml
index 5141f50..7d6b24b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,7 +66,7 @@
1.0.0
1.3.0
19.0.0
- 25.0.6
+ 26.0.6
diff --git a/src/test/java/io/kokuwa/keycloak/FailoverIT.java b/src/test/java/io/kokuwa/keycloak/FailoverIT.java
index 24bc117..0a71695 100644
--- a/src/test/java/io/kokuwa/keycloak/FailoverIT.java
+++ b/src/test/java/io/kokuwa/keycloak/FailoverIT.java
@@ -1,7 +1,6 @@
package io.kokuwa.keycloak;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
-import static org.junit.jupiter.api.Assertions.assertThrows;
import java.util.stream.IntStream;
@@ -13,7 +12,6 @@
import io.kokuwa.keycloak.k8s.KubernetesExtension;
import io.kokuwa.keycloak.keycloak.KeycloakExtension;
import io.kokuwa.keycloak.keycloak.OpenIDConnect;
-import jakarta.ws.rs.NotAuthorizedException;
@DisplayName("failover")
@ExtendWith(KubernetesExtension.class)
@@ -40,9 +38,9 @@ void rollingRestart(Kubernetes kubernetes, OpenIDConnect oidc) {
"session should be available after restart"));
}
- @DisplayName("session should be lost after scaling keycloak to 0")
+ @DisplayName("session should remain after scaling keycloak to 0")
@Test
- void sessionLost(Kubernetes kubernetes, OpenIDConnect oidc) {
+ void sessionRemains(Kubernetes kubernetes, OpenIDConnect oidc) {
// get token and validate on userinfo endpoint
@@ -54,8 +52,8 @@ void sessionLost(Kubernetes kubernetes, OpenIDConnect oidc) {
kubernetes.scaleKeycloak(0);
kubernetes.scaleKeycloak(Kubernetes.KEYCLOAK_REPLICAS);
- // try to validate old token, should fail because session was lost
+ // try to validate old token, should be fine because session should be stored since KeyCloak >= 26
- assertThrows(NotAuthorizedException.class, () -> oidc.userinfo("test", token), "session should be lost");
+ assertDoesNotThrow(() -> oidc.userinfo("test", token), "session should still be valid");
}
}