Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-7357

Clean shared state pollution to avoid flaky tests in class TestAppController

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • test
    • None

    Description

      What is the purpose of this change

      This issue is to fix a non-idempotent test

      org.apache.hadoop.mapreduce.v2.app.webapp.TestAppController.testAttempt

      Why the test failed

      The root cause for the failure is that this test does not remove the value of key AMParams.ATTEMPT_STATE, which pollutes the shared state. It may be better to clean state pollutions so that some other tests won't fail in the future due to the shared state polluted by this test.

      Reproduce test failure

      Run the test twice in the same JVM.

      Expected result

      The test should run successfully without any failures.

      Actual result

      Failure from test run:

      [ERROR] Failures:
      [ERROR] TestAppController.testAttempts:315 expected:<[Bad request: missing attempt-state.]> but was:<[State MAP attempts in job_01_01]>

      Fix 

      Remove the AMParams.ATTEMPT_STATE key-value pair.

      Link to PR:

      Attachments

        Activity

          People

            Unassigned Unassigned
            LALAYANG Yang Chen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: