From b8d5e01cf3b4c708410ada7f48357800a7f3f55b Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Wed, 13 Jul 2022 14:58:01 +0200 Subject: [PATCH] Avoid using old legacy-store API in the test suite (#13077) --- .../testsuite/ui/account2/DeviceActivityTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/DeviceActivityTest.java b/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/DeviceActivityTest.java index ace1c5be4f..534b8eccdb 100644 --- a/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/DeviceActivityTest.java +++ b/testsuite/integration-arquillian/tests/other/base-ui/src/test/java/org/keycloak/testsuite/ui/account2/DeviceActivityTest.java @@ -207,8 +207,8 @@ public class DeviceActivityTest extends BaseAccountPageTest { RealmModel realm = session.realms().getRealmByName(TEST); UserSessionModel userSession = session.sessions().getUserSession(realm, sessionId); - ClientModel client2 = session.clientLocalStorage().getClientByClientId(TEST_CLIENT2_ID, realm); - ClientModel client3 = session.clientLocalStorage().getClientByClientId(TEST_CLIENT3_ID, realm); + ClientModel client2 = session.clients().getClientByClientId(realm, TEST_CLIENT2_ID); + ClientModel client3 = session.clients().getClientByClientId(realm, TEST_CLIENT3_ID); session.sessions().createClientSession(realm, client2, userSession); session.sessions().createClientSession(realm, client3, userSession); @@ -293,8 +293,8 @@ public class DeviceActivityTest extends BaseAccountPageTest { String sessionId = "abcdefg"; testingClient.server().run(session -> { RealmModel realm = session.realms().getRealmByName(TEST); - ClientModel client = session.clientLocalStorage().getClientByClientId(TEST_CLIENT_ID, realm); - UserModel user = session.users().getUserByUsername("test", realm); // cannot use testUser.getUsername() because it throws NotSerializableException for no apparent reason (or maybe I'm just stupid :D) + ClientModel client = session.clients().getClientByClientId(realm, TEST_CLIENT_ID); + UserModel user = session.users().getUserByUsername(realm, "test"); // cannot use testUser.getUsername() because it throws NotSerializableException for no apparent reason (or maybe I'm just stupid :D) UserSessionModel userSession = session.sessions().createUserSession(sessionId, realm, user, "test", ip, "form", false, null, null, null); session.sessions().createClientSession(realm, client, userSession);