Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-26411

Fix TestReplicationMetricCollector flakiness

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • Tests

    Description

      TestReplicationMetricCollector tests can fail intermittently because 

      ReplicationMetricCollector schedules a MetrikSink thread that consumes the MetricCollector's 

      metricMap regularly and if this happens at the wrong time, the tests, that use the MetricCollector.getInstance().getMetrics() method, can fail.

      Example stack trace:

      java.lang.AssertionError: expected:<1> but was:<0> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:743) at org.junit.Assert.assertEquals(Assert.java:118) at org.junit.Assert.assertEquals(Assert.java:555) at org.junit.Assert.assertEquals(Assert.java:542) at org.apache.hadoop.hive.ql.parse.repl.metric.TestReplicationMetricCollector.testFailoverReadyDumpMetrics(TestReplicationMetricCollector.java:227)

      Attachments

        Issue Links

          Activity

            People

              ghanko Hankó Gergely
              ghanko Hankó Gergely
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m