Merge pull request #2870 from stianst/KEYCLOAK-2851-1.9

KEYCLOAK-2851 InitialAccessTokenTest#createExpired fails occasionally
This commit is contained in:
Stian Thorgersen committed 2016-05-23 12:04:26 +02:00
commit 06ab9c9dcf
1 file changed
+3 -3
@@ -50,7 +50,7 @@ public class InitialAccessTokenTest extends AbstractClientRegistrationTest {
ClientRepresentation rep = new ClientRepresentation();
Thread.sleep(2);
setTimeOffset(10);
ClientRepresentation created = reg.create(rep);
Assert.assertNotNull(created);
@@ -91,12 +91,12 @@ public class InitialAccessTokenTest extends AbstractClientRegistrationTest {
ClientRepresentation rep = new ClientRepresentation();
Thread.sleep(2);
setTimeOffset(10);
try {
reg.create(rep);
} catch (ClientRegistrationException e) {
Assert.assertEquals(403, ((HttpErrorException) e.getCause()).getStatusLine().getStatusCode());
Assert.assertEquals(401, ((HttpErrorException) e.getCause()).getStatusLine().getStatusCode());
}
}