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

Clean shared state pollution to avoid flaky test testMR

    XMLWordPrintableJSON

Details

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

    Description

      What is the purpose of this change

      This PR is to fix a non-idempotent test:

      org.apache.hadoop.mapred.TestClusterMRNotification.testMR

      Why the test failed

      The root cause for the failure is that this test does not clean NotificationServlet.counter at the end, 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:

      NotificationTestCase.testMR:174 expected:<2> but was:<8>

      Fix

      Clear the value of NotificationServlet.counter at the end of the test.

       

      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: