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

Flaky tests in TestCoordMaterializeTriggerService class

    XMLWordPrintableJSON

Details

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

    Description

      The tests in TestCoordMaterializeTriggerService can fail with various problems.

      For example, testCoordMaterializeTriggerService3 typically fails with:

      junit.framework.AssertionFailedError: expected:<PREP> but was:<RUNNING>
              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:86)
              at junit.framework.TestCase.assertEquals(TestCase.java:253)
              at org.apache.oozie.service.TestCoordMaterializeTriggerService.testCoordMaterializeTriggerService3(TestCoordMaterializeTriggerService.java:151)
      

      The reason is that CoordMaterializeTriggerService is running in the background which is what we're trying to test and it interferes with the test execution:

      05:59:17,474 [CallableQueue-2] DEBUG CoordMaterializeTransitionXCommand:526 - USER[test] GROUP[testg] TOKEN[] APP[COORD-TEST] JOB[0000002-180529055913420-oozie-root-C] ACTION[-] Coordinator job :0000002-180529055913420-oozie-root-C, maxActionToBeCreated :1, Mat_Throttle :1, numWaitingActions :0
      05:59:17,475 [CallableQueue-2] DEBUG CoordMaterializeTransitionXCommand:526 - USER[test] GROUP[testg] TOKEN[] APP[COORD-TEST] JOB[0000002-180529055913420-oozie-root-C] ACTION[-] Materializing action for time=2018-05-29T12:59Z, lastactionnumber=1 timeout=0 minutes
      05:59:17,475 [CallableQueue-2]  WARN DateUtils:523 - USER[test] GROUP[testg] TOKEN[] APP[COORD-TEST] JOB[0000002-180529055913420-oozie-root-C] ACTION[-] GMT, UTC or Region/City Timezone formats are preferred instead of America/Los_Angeles
      05:59:17,475 [CallableQueue-2] DEBUG CoordMaterializeTransitionXCommand:526 - USER[test] GROUP[testg] TOKEN[] APP[COORD-TEST] JOB[0000002-180529055913420-oozie-root-C] ACTION[-] In storeToDB() coord action id = 0000002-180529055913420-oozie-root-C@1, size of actionXml = 1129
      05:59:17,476 [CallableQueue-2] DEBUG CoordMaterializeTransitionXCommand:526 - USER[test] GROUP[testg] TOKEN[] APP[COORD-TEST] JOB[0000002-180529055913420-oozie-root-C] ACTION[-] Not registering SLA for job [0000002-180529055913420-oozie-root-C@1]. Sla-Xml null OR SLAService not enabled
      05:59:17,476 [CallableQueue-2]  INFO CoordMaterializeTransitionXCommand:520 - USER[test] GROUP[testg] TOKEN[] APP[COORD-TEST] JOB[0000002-180529055913420-oozie-root-C] ACTION[-] [0000002-180529055913420-oozie-root-C]: Update status from PREP to RUNNING
      05:59:17,476 [CallableQueue-2]  WARN DateUtils:523 - USER[test] GROUP[testg] TOKEN[] APP[COORD-TEST] JOB[0000002-180529055913420-oozie-root-C] ACTION[-] GMT, UTC or Region/City Timezone formats are preferred instead of America/Los_Angeles
      05:59:17,476 [CallableQueue-2]  INFO CoordMaterializeTransitionXCommand:520 - USER[test] GROUP[testg] TOKEN[] APP[COORD-TEST] JOB[0000002-180529055913420-oozie-root-C] ACTION[-] [0000002-180529055913420-oozie-root-C]: all actions have been materialized, set pending to true
      05:59:17,476 [CallableQueue-2]  INFO CoordMaterializeTransitionXCommand:520 - USER[test] GROUP[testg] TOKEN[] APP[COORD-TEST] JOB[0000002-180529055913420-oozie-root-C] ACTION[-] Coord Job status updated to = RUNNING
      

      Attachments

        1. OOZIE-3269-001.patch
          0.7 kB
          Peter Bacsko

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: