[ https://issues.apache.org/jira/browse/MAPREDUCE-7476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17843152#comment-17843152 ]
ASF GitHub Bot commented on MAPREDUCE-7476: ------------------------------------------- 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. > Follow up of https://issues.apache.org/jira/browse/MAPREDUCE-7475 - detected > 5 more non-idempotent tests(pass in the first run but fails in repeated runs > in the same JVM) > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: MAPREDUCE-7476 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-7476 > Project: Hadoop Map/Reduce > Issue Type: Bug > Reporter: Kaiyao Ke > Priority: Major > Original Estimate: 1h > Remaining Estimate: 1h > > Similar with https://issues.apache.org/jira/browse/MAPREDUCE-7475 , 5 more > non-idempotent unit tests are detected. > 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 > 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 > The following test fully deletes `TEST_ROOT_DIR` after execution, so repeated > runs will throw a`DiskErrorException`: > * org.apache.hadoop.mapred.TestMapTask#testShufflePermissions > The following test does not restore the static variable `statusUpdateTimes` > after execution, so consecutive runs throws `AssertionError`: > * org.apache.hadoop.mapred.TestTaskProgressReporter#testTaskProgress -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: mapreduce-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: mapreduce-issues-h...@hadoop.apache.org