Merge pull request #3308 from mhajas/KEYCLOAK-3694

KEYCLOAK-3694 Fix timeSkewTest on windows
This commit is contained in:
Pavel Drozd 2016-10-13 08:26:35 +02:00 committed by GitHub
commit f868aa7fbe

View file

@ -376,6 +376,8 @@ public abstract class AbstractJSConsoleExampleAdapterTest extends AbstractExampl
jsConsoleTestAppPage.refreshTimeSkew();
waitUntilElement(jsConsoleTestAppPage.getTimeSkewValue()).text().not().contains("undefined");
int timeSkew = Integer.parseInt(jsConsoleTestAppPage.getTimeSkewValue().getText());
assertTrue("TimeSkew was: " + timeSkew + ", but should be ~0", timeSkew >= 0 - TIME_SKEW_TOLERANCE);
assertTrue("TimeSkew was: " + timeSkew + ", but should be ~0", timeSkew <= TIME_SKEW_TOLERANCE);
@ -384,6 +386,8 @@ public abstract class AbstractJSConsoleExampleAdapterTest extends AbstractExampl
jsConsoleTestAppPage.refreshToken();
jsConsoleTestAppPage.refreshTimeSkew();
waitUntilElement(jsConsoleTestAppPage.getTimeSkewValue()).text().not().contains("undefined");
timeSkew = Integer.parseInt(jsConsoleTestAppPage.getTimeSkewValue().getText());
assertTrue("TimeSkew was: " + timeSkew + ", but should be ~-40", timeSkew + 40 >= 0 - TIME_SKEW_TOLERANCE);
assertTrue("TimeSkew was: " + timeSkew + ", but should be ~-40", timeSkew + 40 <= TIME_SKEW_TOLERANCE);