Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D114A17E55 for ; Fri, 26 Jun 2015 15:21:06 +0000 (UTC) Received: (qmail 40721 invoked by uid 500); 26 Jun 2015 15:21:06 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 40681 invoked by uid 500); 26 Jun 2015 15:21:06 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 40632 invoked by uid 99); 26 Jun 2015 15:21:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Jun 2015 15:21:06 +0000 Date: Fri, 26 Jun 2015 15:21:06 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-13974) TestRateLimiter#testFixedIntervalResourceAvailability may fail MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-13974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14603035#comment-14603035 ] Ted Yu commented on HBASE-13974: -------------------------------- {code} fht https://builds.apache.org/job/PreCommit-HBASE-Build/14583/console Fetching the console output from the URL Printing hanging tests Hanging test : org.apache.hadoop.hbase.regionserver.wal.TestWALReplay Printing Failing tests {code} The above failure was not related to patch. > 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 > 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)