incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [1/2] git commit: Fix unit test failure only on Windows environment.
Date Tue, 29 Jan 2013 19:19:31 GMT
Fix unit test failure only on Windows environment.

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

Branch: refs/heads/master
Commit: 1c20c80cb515252a7703b33c964c7bd2bb3fac1a
Parents: 74efaad
Author: Min Chen <min.chen@citrix.com>
Authored: Tue Jan 29 11:09:06 2013 -0800
Committer: Min Chen <min.chen@citrix.com>
Committed: Tue Jan 29 11:09:06 2013 -0800

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


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1c20c80c/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 85eeaaf..4ffab7a 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
@@ -219,7 +219,8 @@ public class ApiRateLimitTest {
         ApiLimitResponse response = _limitService.searchApiLimit(testAccount);
         assertEquals("apiIssued is incorrect", 5, response.getApiIssued());
         assertEquals("apiAllowed is incorrect", 5, response.getApiAllowed());
-        assertTrue("expiredAfter is incorrect", response.getExpireAfter() < 1000);
+        // using <= to account for inaccurate System.currentTimeMillis() clock in Windows
environment
+        assertTrue("expiredAfter is incorrect", response.getExpireAfter() <= 1000);
 
     }
 


Mime
View raw message