[
https://issues.apache.org/jira/browse/MAPREDUCE-7360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yang Chen updated MAPREDUCE-7360:
---------------------------------
Description:
h2. What is the purpose of this change
This PR is to clean shared state pollution between tests:
{code:java}
Test1:
org.apache.hadoop.mapreduce.v2.app.TestJobEndNotifier.testNotificationOnLastRetryShutdownWithRuntimeException
Test2:
org.apache.hadoop.mapreduce.v2.app.TestMRAppMaster.testMRAppMasterShutDownJob{code}
{{}} * Test1 can pollute the shared status with Test2, which can lead Test2 to
fail after runing Test1.
* 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
First Run Test1, then run Test2 in the same JVM
h2. Expected result
The tests should run successfully when multiple tests that use this state are
run in the same JVM.
h2. Actual result
Test2 fails:
{code:java}
[ERROR] TestMRAppMaster.testMRAppMasterShutDownJob:530 Expected shutDownJob to
exit with status code of 0. expected:<0> but was:<1>{code}
{{}}
h2. Fix
Reset FirstExitException at the start of the test to clean the pollution from
Test1.
was:
h2. What is the purpose of this change
This PR is to fix a non-idempotent test {{}}
{code:java}
org.apache.hadoop.mapreduce.v2.app.TestMRAppMaster.testMRAppMasterShutDownJob{code}
{{}}
h2. Why the test failed
The root cause for the failure is that this test does not reset
FirstExitException 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}
[ERROR] Failures: [ERROR] TestMRAppMaster.testMRAppMasterShutDownJob:530
Expected shutDownJob to exit with status code of 0. expected:<0> but
was:<1>{code}
{{}}
h2. Fix
Reset FirstExitException at the end of the test.
Link to PR:
> Clean shared state pollution to avoid flaky tests in class TestMRAppMaster
> --------------------------------------------------------------------------
>
> Key: MAPREDUCE-7360
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-7360
> 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 clean shared state pollution between tests:
> {code:java}
> Test1:
> org.apache.hadoop.mapreduce.v2.app.TestJobEndNotifier.testNotificationOnLastRetryShutdownWithRuntimeException
>
> Test2:
> org.apache.hadoop.mapreduce.v2.app.TestMRAppMaster.testMRAppMasterShutDownJob{code}
> {{}} * Test1 can pollute the shared status with Test2, which can lead Test2
> to fail after runing Test1.
> * 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
> First Run Test1, then run Test2 in the same JVM
> h2. Expected result
> The tests should run successfully when multiple tests that use this state are
> run in the same JVM.
> h2. Actual result
> Test2 fails:
> {code:java}
> [ERROR] TestMRAppMaster.testMRAppMasterShutDownJob:530 Expected shutDownJob
> to exit with status code of 0. expected:<0> but was:<1>{code}
> {{}}
> h2. Fix
> Reset FirstExitException at the start of the test to clean the pollution from
> Test1.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]