From 5775e7c4ba15319170ed7561f4938ac59cadfb87 Mon Sep 17 00:00:00 2001 From: Stefan Guilhen Date: Mon, 22 Aug 2022 03:39:14 -0300 Subject: [PATCH] Fix ConcurrentTransactionsTest failure with CockroachDB (#13890) - realm has to be removed in a separate tx due to CRDB's SERIALIZABLE isolation level Closes #13211 --- .../keycloak/testsuite/model/ConcurrentTransactionsTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/model/ConcurrentTransactionsTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/model/ConcurrentTransactionsTest.java index a792ac318e..1cfc0c294a 100755 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/model/ConcurrentTransactionsTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/model/ConcurrentTransactionsTest.java @@ -189,7 +189,7 @@ public class ConcurrentTransactionsTest extends AbstractTestRealmKeycloakTest { }); } finally { - tearDownRealm(session, "user1", "user2"); + KeycloakModelUtils.runJobInTransaction(session.getKeycloakSessionFactory(), kcSession -> tearDownRealm(kcSession, "user1", "user2")); } }