Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Commit

Permalink
GTNPORTAL-3194 small adjustment to make token tests adaptable to a va…
Browse files Browse the repository at this point in the history
…riety of building environments
  • Loading branch information
trongtt committed Sep 16, 2013
1 parent f207151 commit 26c2f28
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Expand Up @@ -77,7 +77,7 @@ public void testCleanExpiredTokens() throws Exception {
service.cleanExpiredTokens();
assertEquals(2, service.size());

Thread.sleep(1000);
Thread.sleep(1100);
service.cleanExpiredTokens();
assertEquals(1, service.size());

Expand Down
Expand Up @@ -90,9 +90,9 @@ public void testCleanExpiredTokens() throws Exception {
Thread.sleep(1000);
service.createToken(new Credentials("user2", "gtn"));
assertEquals(2, service.size());
Thread.sleep(1000);
Thread.sleep(1100);
service.cleanExpiredTokens();
/* one of the two tokens should have been cleaned after cca 2 seconds */
/* one of the two tokens should have been cleaned after cca 2.1 seconds */
assertEquals(1, service.size());
}

Expand Down
Expand Up @@ -150,10 +150,10 @@ public void testCleanExpiredTokens() throws Exception {
service.createToken(tokenIndex, tokenInfo);

assertEquals(2, service.size());
Thread.sleep(1000);
Thread.sleep(1100);
service.cleanExpiredTokens();
/*
* one of the two tokens should have been cleaned at this point, i.e. cca 2 seconds after the creation of the first
* one of the two tokens should have been cleaned at this point, i.e. cca 2.1 seconds after the creation of the first
* one
*/
assertEquals(1, service.size());
Expand Down

0 comments on commit 26c2f28

Please sign in to comment.