You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Norbert Kalmar (JIRA)" <ji...@apache.org> on 2019/02/26 14:24:01 UTC

[jira] [Commented] (HBASE-21416) Intermittent TestRegionInfoDisplay failure due to shift in relTime of RegionState#toDescriptiveString

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

Norbert Kalmar commented on HBASE-21416:
----------------------------------------

I took a look on this ticket.
The test has a private method to check discriptiveName with a function that keeps in mind millisecond can differ:
checkDescriptiveNameEquality()

It is used for the first comparison, but not for the second.
I think this should solve the fkaliness (I couldn't reproduce the flaky test nor does Jenkins flaky runs show any failure lately, but looking at the jiras there were some instances when this failed. Rarely though.)

I will create a patch that can be reviewed.

> Intermittent TestRegionInfoDisplay failure due to shift in relTime of RegionState#toDescriptiveString
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-21416
>                 URL: https://issues.apache.org/jira/browse/HBASE-21416
>             Project: HBase
>          Issue Type: Test
>            Reporter: Ted Yu
>            Priority: Minor
>
> Over https://builds.apache.org/job/HBase-Flaky-Tests/job/branch-2.1/1799/testReport/junit/org.apache.hadoop.hbase.client/TestRegionInfoDisplay/testRegionDetailsForDisplay/ :
> {code}
> org.junit.ComparisonFailure: expected:<...:30 UTC 2018 (PT0.00[6]S ago), server=null> but was:<...:30 UTC 2018 (PT0.00[7]S ago), server=null>
> 	at org.apache.hadoop.hbase.client.TestRegionInfoDisplay.testRegionDetailsForDisplay(TestRegionInfoDisplay.java:78)
> {code}
> Here is how toDescriptiveString composes relTime:
> {code}
>     long relTime = System.currentTimeMillis() - stamp;
> {code}
> In the test, state.toDescriptiveString() is called twice for the assertion where different return values from System.currentTimeMillis() caused the assertion to fail in the above occasion.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)