Increase sleep time to allow token expire to account for windows
environment clock issue.

Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/85de14f6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/85de14f6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/85de14f6

Branch: refs/heads/ui-plugins
Commit: 85de14f6a45d802edaef6c7fb4e2a78f0db83c3b
Parents: 1c20c80
Author: Min Chen <[email protected]>
Authored: Tue Jan 29 11:19:09 2013 -0800
Committer: Min Chen <[email protected]>
Committed: Tue Jan 29 11:19:09 2013 -0800

----------------------------------------------------------------------
 .../cloudstack/ratelimit/ApiRateLimitTest.java     |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/85de14f6/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/ApiRateLimitTest.java
----------------------------------------------------------------------
diff --git 
a/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/ApiRateLimitTest.java
 
b/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/ApiRateLimitTest.java
index 4ffab7a..502b15c 100644
--- 
a/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/ApiRateLimitTest.java
+++ 
b/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/ApiRateLimitTest.java
@@ -181,7 +181,7 @@ public class ApiRateLimitTest {
         assertTrue("The first request should be allowed", isUnderLimit(key));
 
         // Allow the token to expire
-        Thread.sleep(1001);
+        Thread.sleep(1020);
 
         assertTrue("Another request after interval should be allowed as well", 
isUnderLimit(key));
     }

Reply via email to