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:26:37 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.1 c73ace3a7 -> a1b696d70


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/a1b696d7
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a1b696d7
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a1b696d7

Branch: refs/heads/branch-1.1
Commit: a1b696d705d5f7b9370dad8148914f14d9c83cbd
Parents: c73ace3
Author: tedyu <yuzhihong@gmail.com>
Authored: Fri Jun 26 08:26:42 2015 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Fri Jun 26 08:26:42 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/a1b696d7/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