[ 
https://issues.apache.org/jira/browse/MAPREDUCE-7311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shilun Fan updated MAPREDUCE-7311:
----------------------------------
          Component/s: test
     Target Version/s: 3.2.4, 3.3.2, 3.4.0
    Affects Version/s: 3.2.4
                       3.3.2
                       3.4.0

> Fix non-idempotent test in TestTaskProgressReporter
> ---------------------------------------------------
>
>                 Key: MAPREDUCE-7311
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-7311
>             Project: Hadoop Map/Reduce
>          Issue Type: Test
>          Components: test
>    Affects Versions: 3.4.0, 3.3.2, 3.2.4
>            Reporter: Zhengxi Li
>            Assignee: Zhengxi Li
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 3.4.0, 3.3.2, 3.2.4
>
>         Attachments: MAPREDUCE-7311.001.patch, MAPREDUCE-7311.002.patch
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> The test 
> {{`org.apache.hadoop.mapred.TestTaskProgressReporter.testBytesWrittenRespectingLimit`}}
>  is not idempotent and fails if run twice in the same JVM, because it 
> pollutes state shared among tests. It may be good to clean this state 
> pollution so that some other tests do not fail in the future due to the 
> shared state polluted by this test.
> h3. Details
> Running {{`TestTaskProgressReporter.testBytesWrittenRespectingLimit`}} twice 
> would result in the second run failing with the following assertion:
> {noformat}
> Assert.assertEquals(failFast, threadExited)
> {noformat}
> The root cause for this is that when`testBytesWrittenRespectingLimit` writes 
> some bytes on the local file system, some counters are being incremented. The 
> problem is that, after the test is done, the counter is not reset. With this 
> polluted shared state, assumptions are broken, resulting in test failure in 
> the second run.
> PR link: https://github.com/apache/hadoop/pull/2500



--
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

Reply via email to