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

TestCoordActionInputCheckXCommand.testCoordActionInputCheckXCommandUniqueness() is flaky

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • core
    • None

    Description

      The testcase testCoordActionInputCheckXCommandUniqueness is unstable.

      We add three XCommands with the same actionId (entityKeys are different) into the CallableQueueService. Only the first XCommand is expected to run.

      The reason why sometimes either the 2nd or 3rd XCommand executes is because as soon as the first starts to run, its removed from the uniqueCallables map immediately. If the first scheduled task runs quickly, then either the 2nd or 3rd XCommand has the chance to get scheduled.

      Step by step:
      1. Schedule first XCommand
      2. XCommand is added to uniqueCallables
      3. Schedule second XCommand
      4. First XCommand starts to run in the thread pool and removes itself from uniqueCallables (see CallableWrapper.run())
      5. Second XCommand can successfully add itself to uniqueCallables
      6. Second XCommand starts to run

      Please clarify whether this is the expected behavior of CallableQueueService.

      If not, then moving removeFromUniqueCallables() to the finally block solves the problem.

      Attachments

        1. OOZIE-2566-01.patch
          3 kB
          Andras Salamon

        Activity

          People

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

            Dates

              Created:
              Updated: