hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-13974 TestRateLimiter#testFixedIntervalResourceAvailability may fail (Guanghao Zhang)
Date Fri, 26 Jun 2015 15:25:39 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 27c48d076 -> 85ce33649


HBASE-13974 TestRateLimiter#testFixedIntervalResourceAvailability may fail (Guanghao Zhang)


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

Branch: refs/heads/branch-1.2
Commit: 85ce336493569bfb83390b285a8bcce3b3def164
Parents: 27c48d0
Author: tedyu <yuzhihong@gmail.com>
Authored: Fri Jun 26 08:25:45 2015 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Fri Jun 26 08:25:45 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/quotas/TestRateLimiter.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/85ce3364/hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestRateLimiter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestRateLimiter.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestRateLimiter.java
index 8073d5f..4c5a658 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestRateLimiter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestRateLimiter.java
@@ -135,13 +135,13 @@ public class TestRateLimiter {
   @Test
   public void testFixedIntervalResourceAvailability() throws Exception {
     RateLimiter limiter = new FixedIntervalRateLimiter();
-    limiter.set(10, TimeUnit.MILLISECONDS);
+    limiter.set(10, TimeUnit.SECONDS);
 
     assertTrue(limiter.canExecute(10));
     limiter.consume(3);
     assertEquals(7, limiter.getAvailable());
     assertFalse(limiter.canExecute(10));
-    limiter.setNextRefillTime(limiter.getNextRefillTime() - 3);
+    limiter.setNextRefillTime(limiter.getNextRefillTime() - 1000);
     assertTrue(limiter.canExecute(10));
     assertEquals(10, limiter.getAvailable());
   }


Mime
View raw message