KEYCLOAK-2851 InitialAccessTokenTest#createExpired fails occasionally
This commit is contained in:
parent
74809b4132
commit
e52f7c56a9
1 changed files with 3 additions and 3 deletions
|
@ -50,7 +50,7 @@ public class InitialAccessTokenTest extends AbstractClientRegistrationTest {
|
||||||
|
|
||||||
ClientRepresentation rep = new ClientRepresentation();
|
ClientRepresentation rep = new ClientRepresentation();
|
||||||
|
|
||||||
Thread.sleep(2);
|
setTimeOffset(10);
|
||||||
|
|
||||||
ClientRepresentation created = reg.create(rep);
|
ClientRepresentation created = reg.create(rep);
|
||||||
Assert.assertNotNull(created);
|
Assert.assertNotNull(created);
|
||||||
|
@ -91,12 +91,12 @@ public class InitialAccessTokenTest extends AbstractClientRegistrationTest {
|
||||||
|
|
||||||
ClientRepresentation rep = new ClientRepresentation();
|
ClientRepresentation rep = new ClientRepresentation();
|
||||||
|
|
||||||
Thread.sleep(2);
|
setTimeOffset(10);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
reg.create(rep);
|
reg.create(rep);
|
||||||
} catch (ClientRegistrationException e) {
|
} catch (ClientRegistrationException e) {
|
||||||
Assert.assertEquals(403, ((HttpErrorException) e.getCause()).getStatusLine().getStatusCode());
|
Assert.assertEquals(401, ((HttpErrorException) e.getCause()).getStatusLine().getStatusCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue