[
https://issues.apache.org/jira/browse/HBASE-21416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16786611#comment-16786611
]
Norbert Kalmar commented on HBASE-21416:
----------------------------------------
So state.toDescriptiveString() never changes, hbase.display.keys only affects
RegionInfoDisplay.getDescriptiveNameFromRegionStateForDisplay, that is what's
under test. No reason to call state.toDescriptiveString() twice.
Adding the patch to the jira...
> 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
> Assignee: Norbert Kalmar
> 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)