KEYCLOAK-10246 Fix MultipleRealmsTest on undertow
This commit is contained in:
parent
80932c07a2
commit
4ced3b0aee
1 changed files with 4 additions and 1 deletions
|
@ -118,14 +118,17 @@ public class MultipleRealmsTest extends AbstractTestRealmKeycloakTest {
|
|||
UserModel user1 = currentSession.users().getUserByUsername("user1", realm1);
|
||||
UserModel user1a = currentSession.users().getUserByUsername("user1", realm2);
|
||||
|
||||
UserManager um = new UserManager(session);
|
||||
UserManager um = new UserManager(currentSession);
|
||||
if (user1 != null) {
|
||||
um.removeUser(realm1, user1);
|
||||
}
|
||||
if (user1a != null) {
|
||||
um.removeUser(realm2, user1a);
|
||||
}
|
||||
});
|
||||
|
||||
KeycloakModelUtils.runJobInTransaction(session.getKeycloakSessionFactory(), (KeycloakSession sessionTestUser3) -> {
|
||||
KeycloakSession currentSession = sessionTestUser3;
|
||||
currentSession.realms().removeRealm("id1");
|
||||
currentSession.realms().removeRealm("id2");
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue