Stabilize testPersistenceMultipleNodesClientSessionsAtRandomNode model test

This commit is contained in:
Martin Kanis 2022-09-26 20:25:38 +02:00 committed by Hynek Mlnařík
parent a8db79a68c
commit 42ad95af4d

View file

@ -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 // 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." // on-going transaction, so it does not accept new invocations."
// also: org.infinispan.commons.CacheException: java.lang.IllegalStateException: Read commands must ignore leavers // also: org.infinispan.commons.CacheException: java.lang.IllegalStateException: Read commands must ignore leavers
if ((ex.getCause() != null && ex.getCause().getMessage().contains("ISPN000324") || if ((ex.getCause() != null && ex.getCause().getMessage().contains("ISPN000324")) ||
(ex instanceof CacheException && ex.getMessage().contains("Read commands must ignore leavers")))) { (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); 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 { } else {
throw ex; throw ex;