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

Fix non-idempotent unit tests

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.4.0
    • 3.5.0, 3.4.1
    • test
    • Ubuntu 22.04, Java 17

    • Reviewed
    • Patch

    Description

      2 tests are not idempotent and fails upon repeated execution within the same JVM instance due to self-induced state pollution. Specifically, these tests try to make the directory TEST_ROOT_DIR and write to it. The tests do not clean up (remove) the directory after execution. Therefore, in the second execution, TEST_ROOT_DIR would already exist and the exception `Could not create test dir` would be thrown. Below are the 2 non-idempotent tests:

      • org.apache.hadoop.mapred.TestOldCombinerGrouping.testCombiner
      • org.apache.hadoop.mapreduce.TestNewCombinerGrouping.testCombiner

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            kaiyaok2 Kaiyao Ke
            kaiyaok2 Kaiyao Ke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment