Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-3111 [Umbrella] Fix flaky tests in Oozie
  3. OOZIE-3295

Flaky test TestSLACalculatorMemory#testAddMultipleRestartRemoveMultipleInstrumentedCorrectly

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.1.0
    • core, tests
    • None

    Description

      The test TestSLACalculatorMemory.testAddMultipleRestartRemoveMultipleInstrumentedCorrectly can fail with the following error:

      junit.framework.AssertionFailedError: SLA map size after update all should be 2. An instance of SLACalcStatus was removed expected:<2> but was:<1>
      	at junit.framework.Assert.fail(Assert.java:57)
      	at junit.framework.Assert.failNotEquals(Assert.java:329)
      	at junit.framework.Assert.assertEquals(Assert.java:78)
      	at junit.framework.Assert.assertEquals(Assert.java:159)
      	at junit.framework.TestCase.assertEquals(TestCase.java:316)
      	at org.apache.oozie.sla.TestSLACalculatorMemory.testAddMultipleRestartRemoveMultipleInstrumentedCorrectly(TestSLACalculatorMemory.java:1084)
      

      The problem is the following setting:

      slaRegBean1.setExpectedDuration(123);
      

      The expected duration should not be set for such a small value (123 msecs). On a slow machine, SLA calculator might detect that this particular SLA has been missed. It must be increased to a higher value.

      Attachments

        1. OOZIE-3295-001.patch
          0.8 kB
          Peter Bacsko

        Issue Links

          Activity

            People

              pbacsko Peter Bacsko
              pbacsko Peter Bacsko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: