kaiyaok2 opened a new pull request, #6790: URL: https://github.com/apache/hadoop/pull/6790
### Description of PR Similar with https://issues.apache.org/jira/browse/MAPREDUCE-7475 , this PR fixes more non-idempotent unit tests detected. ## Overview & Proposed Fix of all remaining non-idempotent unit tests in the MapReduce Project The following two tests below do not reset `NotificationServlet.counter`, so repeated runs throw assertion failures due to accumulation. - org.apache.hadoop.mapred.TestClusterMRNotification#testMR - org.apache.hadoop.mapred.TestLocalMRNotification#testMR Fixed by resetting `NotificationServlet.counter` and `NotificationServlet.failureCounter` to 0 after test execution. ----------------------------------------------------------------------------------------------- The following test does not remove the key `AMParams.ATTEMPT_STATE`, so repeated runs of the test will not be missing the attempt-state at all: - org.apache.hadoop.mapreduce.v2.app.webapp.TestAppController.testAttempts Fixed by removing `AMParams.ATTEMPT_STATE` at the end of the test. ----------------------------------------------------------------------------------------------- The following test fully deletes `TEST_ROOT_DIR` after execution, so repeated runs will throw a`DiskErrorException`: - org.apache.hadoop.mapred.TestMapTask#testShufflePermissions Fixed by checking if `TEST_ROOT_DIR` exists before test execution. Make the directory if not. ----------------------------------------------------------------------------------------------- The following test does not restore the static variable `statusUpdateTimes` after execution, so consecutive runs throws `AssertionError`: - org.apache.hadoop.mapred.TestTaskProgressReporter#testTaskProgress Fixed by resetting `statusUpdateTimes` to 0 before test execution ### How was this patch tested? After the patch, rerunning the tests in the same JVM does not produce any exceptions. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org