Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-21416

Intermittent TestRegionInfoDisplay failure due to shift in relTime of RegionState#toDescriptiveString

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.0.0-alpha-1, 2.3.0
    • None
    • None
    • Reviewed

    Description

      Over https://builds.apache.org/job/HBase-Flaky-Tests/job/branch-2.1/1799/testReport/junit/org.apache.hadoop.hbase.client/TestRegionInfoDisplay/testRegionDetailsForDisplay/ :

      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)
      

      Here is how toDescriptiveString composes relTime:

          long relTime = System.currentTimeMillis() - stamp;
      

      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.

      Attachments

        1. HBASE-21416.master.001.patch
          2 kB
          Norbert Kalmár

        Activity

          People

            nkalmar Norbert Kalmár
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: