hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13974) TestRateLimiter#testFixedIntervalResourceAvailability may fail
Date Fri, 26 Jun 2015 17:24:06 GMT

    [ https://issues.apache.org/jira/browse/HBASE-13974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14603246#comment-14603246
] 

Hudson commented on HBASE-13974:
--------------------------------

SUCCESS: Integrated in HBase-1.3-IT #10 (See [https://builds.apache.org/job/HBase-1.3-IT/10/])
HBASE-13974 TestRateLimiter#testFixedIntervalResourceAvailability may fail (Guanghao Zhang)
(tedyu: rev 1650b228d0bbeb709c1f7ec9e5cbc0a6a0da988a)
* hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestRateLimiter.java


> TestRateLimiter#testFixedIntervalResourceAvailability may fail
> --------------------------------------------------------------
>
>                 Key: HBASE-13974
>                 URL: https://issues.apache.org/jira/browse/HBASE-13974
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 2.0.0
>            Reporter: Guanghao Zhang
>            Assignee: Guanghao Zhang
>            Priority: Minor
>             Fix For: 2.0.0, 1.2.0, 1.1.2, 1.3.0
>
>         Attachments: HBASE-13974.patch
>
>
> Stacktrace
> java.lang.AssertionError: null
> 	at org.junit.Assert.fail(Assert.java:86)
> 	at org.junit.Assert.assertTrue(Assert.java:41)
> 	at org.junit.Assert.assertFalse(Assert.java:64)
> 	at org.junit.Assert.assertFalse(Assert.java:74)
> 	at org.apache.hadoop.hbase.quotas.TestRateLimiter.testFixedIntervalResourceAvailability(TestRateLimiter.java:151)
> The code of this ut.
> {code}
>      RateLimiter limiter = new FixedIntervalRateLimiter();
>      limiter.set(10, TimeUnit.MILLISECONDS);
>  
>      assertTrue(limiter.canExecute(10));
>      limiter.consume(3);
>      assertEquals(7, limiter.getAvailable());
>      assertFalse(limiter.canExecute(10));
> {code}
> The limiter will refill by MILLISECONDS. So if this unit test execute slowly or hang
by others over 1 ms, the assertFalse(limiter.canExecute(10)) will fail.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message