From 42ad95af4d592c4b9c35ff56fcd1454ceeec6198 Mon Sep 17 00:00:00 2001 From: Martin Kanis Date: Mon, 26 Sep 2022 20:25:38 +0200 Subject: [PATCH] Stabilize testPersistenceMultipleNodesClientSessionsAtRandomNode model test --- .../model/session/OfflineSessionPersistenceTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testsuite/model/src/test/java/org/keycloak/testsuite/model/session/OfflineSessionPersistenceTest.java b/testsuite/model/src/test/java/org/keycloak/testsuite/model/session/OfflineSessionPersistenceTest.java index d4ecc196db..f125a74563 100644 --- a/testsuite/model/src/test/java/org/keycloak/testsuite/model/session/OfflineSessionPersistenceTest.java +++ b/testsuite/model/src/test/java/org/keycloak/testsuite/model/session/OfflineSessionPersistenceTest.java @@ -257,8 +257,9 @@ public class OfflineSessionPersistenceTest extends KeycloakModelTest { // IllegalLifecycleStateException: ISPN000324: Cache 'clientSessions' is in 'STOPPING' state and this is an invocation not belonging to an // on-going transaction, so it does not accept new invocations." // also: org.infinispan.commons.CacheException: java.lang.IllegalStateException: Read commands must ignore leavers - if ((ex.getCause() != null && ex.getCause().getMessage().contains("ISPN000324") || - (ex instanceof CacheException && ex.getMessage().contains("Read commands must ignore leavers")))) { + if ((ex.getCause() != null && ex.getCause().getMessage().contains("ISPN000324")) || + (ex.getMessage() != null && ex.getMessage().contains("ISPN000217")) || + (ex instanceof CacheException && ex.getMessage().contains("Read commands must ignore leavers"))) { log.warn("invocation failed, skipping. Retrying might lead to a 'Unique index or primary key violation' when the offline session has already been stored in the DB in the current session", ex); } else { throw ex;