From 337e8f8fad5404bc5a27ea1340956861b1515747 Mon Sep 17 00:00:00 2001 From: vramik Date: Fri, 24 Jan 2020 09:41:37 +0100 Subject: [PATCH] KEYCLOAK-12240 MigrationModelTest fails in pipeline --- .../org/keycloak/testsuite/model/MigrationModelTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/model/MigrationModelTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/model/MigrationModelTest.java index ebd30b1124..0d2aaea9ec 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/model/MigrationModelTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/model/MigrationModelTest.java @@ -13,6 +13,7 @@ import org.keycloak.testsuite.arquillian.annotation.AuthServerContainerExclude; import javax.persistence.EntityManager; import java.util.List; +import org.jboss.logging.Logger; import static org.keycloak.testsuite.arquillian.annotation.AuthServerContainerExclude.AuthServer.REMOTE; @@ -40,7 +41,7 @@ public class MigrationModelTest extends AbstractKeycloakTest { Assert.assertEquals(currentVersion, m.getStoredVersion()); Assert.assertEquals(m.getResourcesTag(), l.get(0).getId()); - Time.setOffset(-5000); + Time.setOffset(-60000); session.realms().getMigrationModel().setStoredVersion("6.0.0"); em.flush(); @@ -49,6 +50,9 @@ public class MigrationModelTest extends AbstractKeycloakTest { l = em.createQuery("select m from MigrationModelEntity m ORDER BY m.updatedTime DESC", MigrationModelEntity.class).getResultList(); Assert.assertEquals(2, l.size()); + Logger.getLogger(MigrationModelTest.class).info("MigrationModelEntity entries: "); + Logger.getLogger(MigrationModelTest.class).info("--id: " + l.get(0).getId() + "; " + l.get(0).getVersion() + "; " + l.get(0).getUpdateTime()); + Logger.getLogger(MigrationModelTest.class).info("--id: " + l.get(1).getId() + "; " + l.get(1).getVersion() + "; " + l.get(1).getUpdateTime()); Assert.assertTrue(l.get(0).getId().matches("[\\da-z]{5}")); Assert.assertEquals(currentVersion, l.get(0).getVersion()); Assert.assertTrue(l.get(1).getId().matches("[\\da-z]{5}"));