[ https://issues.apache.org/jira/browse/MAPREDUCE-7358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yang Chen updated MAPREDUCE-7358: --------------------------------- Description: h2. What is the purpose of this change This PR is to fix a non-idempotent test: {code:java} org.apache.hadoop.mapred.TestClusterMRNotification.testMR{code} h2. 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. h2. Reproduce test failure Run the test twice in the same JVM. h2. Expected result The test should run successfully without any failures. h2. Actual result Failure from test run: {code:java} NotificationTestCase.testMR:174 expected:<2> but was:<8>{code} h1. Fix Clear the value of {{NotificationServlet.counter}} at the end of the test. Link to PR: was: h2. What is the purpose of this change This PR is to fix a non-idempotent test: {code:java} org.apache.hadoop.mapred.TestClusterMRNotification.testMR{code} h2. 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. h2. Reproduce test failure Run the test twice in the same JVM. h2. Expected result The test should pass without any failure 2 times. h2. Actual result Get failures: {code:java} NotificationTestCase.testMR:174 expected:<2> but was:<8>{code} h1. Fix Clear the value of {{NotificationServlet.counter}} at the end of the test. Link to PR: > Clean shared state pollution to avoid flaky test testMR > ------------------------------------------------------- > > Key: MAPREDUCE-7358 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-7358 > Project: Hadoop Map/Reduce > Issue Type: Bug > Components: test > Reporter: Yang Chen > Priority: Minor > > h2. What is the purpose of this change > This PR is to fix a non-idempotent test: > {code:java} > org.apache.hadoop.mapred.TestClusterMRNotification.testMR{code} > h2. 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. > h2. Reproduce test failure > Run the test twice in the same JVM. > h2. Expected result > The test should run successfully without any failures. > h2. Actual result > Failure from test run: > {code:java} > NotificationTestCase.testMR:174 expected:<2> but was:<8>{code} > h1. Fix > Clear the value of {{NotificationServlet.counter}} at the end of the test. > > Link to PR: -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: mapreduce-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: mapreduce-issues-h...@hadoop.apache.org