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

Fix tests that rely on EnvironmentEdgeManager in branch-2.4

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.4.13
    • 2.4.14
    • None

    Description

      https://issues.apache.org/jira/browse/HBASE-25911 converted all System.currentTimeMillis() calls in master and branch-2 to use EnvironmentEdgeManager. For whatever reason, this was not backported to branch-2.4. 

      There exists tests TestAppendTimeRange and TestIncrementTimeRange which rely on EnvironmentEdge injection. These tests are consistently timing out due to logic in RSRpcServices.getRemainingRpcTimeout which subtracts "now" from call.getReceiveTime(). 

      In this case, the now calculation uses EnvironmentEdge, but the ServerCalls use System.currentTimeMillis(). This discrepancy causes the calculated timeout to be unexpectedly large, hanging the test.

      We have two options:

      1. Add EnvironmentEdgeManager in the narrowly necessary places to get this to work.
      2. Revert branch-2.4's getTimeLimit to use System.currentTimeMillis.

      I'm going to push a PR which does option 1, but I'm open to open 2 if that is desired instead.

      Attachments

        Activity

          People

            bbeaudreault Bryan Beaudreault
            bbeaudreault Bryan Beaudreault
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: