[ 
https://issues.apache.org/jira/browse/MAPREDUCE-7342?focusedWorklogId=591823&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-591823
 ]

ASF GitHub Bot logged work on MAPREDUCE-7342:
---------------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/May/21 08:30
            Start Date: 01/May/21 08:30
    Worklog Time Spent: 10m 
      Work Description: lzx404243 opened a new pull request #2968:
URL: https://github.com/apache/hadoop/pull/2968


   The test `org.apache.hadoop.mapred.TestClientRedirect.testRedirect` is not 
idempotent and fail if run twice in the same JVM, because it pollutes some 
states 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.
   
   ### Detail
   Running `TestClientRedirect.testRedirect` twice would result in the second 
run failing due to the following assertion error:
   ```
   INFO  [main] service.AbstractService (AbstractService.java:noteFailure(267)) 
- Service test failed in state STARTED
   org.apache.hadoop.yarn.exceptions.YarnRuntimeException: 
java.net.BindException: 
   
   Problem binding to [0.0.0.0:8054] java.net.BindException: Address already in 
use
   ```
   The root cause is that the RM server listening on port 8054 is started in 
the first run of this test, but hasn't been stopped when the test finishes. In 
the second run, when the test is trying to start the RMService, it fails 
because port 8054 is already in use, leading to the exception.
   
   The suggested fix is to stop the RM server in the added overridden method 
`RMService.serviceStop()`.
   
   With the proposed fix, the test does not pollute the shared state (and 
passes when run twice in the same JVM).
   
   JIRA link: 
[MAPREDUCE-7342](https://issues.apache.org/jira/browse/MAPREDUCE-7342)
   


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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 591823)
    Remaining Estimate: 0h
            Time Spent: 10m

> Non-idempotent test in TestClientRedirect
> -----------------------------------------
>
>                 Key: MAPREDUCE-7342
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-7342
>             Project: Hadoop Map/Reduce
>          Issue Type: Test
>            Reporter: Zhengxi Li
>            Assignee: Zhengxi Li
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The test *{{*org.apache.hadoop.mapred.TestClientRedirect.testRedirect*}}* is 
> not idempotent and fail if run twice in the same JVM, because it pollutes 
> some states 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. Detail
> Running *{{TestClientRedirect.testRedirect}}* twice would result in the 
> second run failing due to the following assertion error:
> {noformat}
> INFO  [main] service.AbstractService (AbstractService.java:noteFailure(267)) 
> - Service test failed in state STARTED
> org.apache.hadoop.yarn.exceptions.YarnRuntimeException: 
> java.net.BindException: 
> Problem binding to [0.0.0.0:8054] java.net.BindException: Address already in 
> use
> {noformat}
> The root cause is that the RM server listening on port 8054) is started in 
> the first run of this test, but hasn't been stopped when the test finishes. 
> In the second run, when the test is trying to start the RMService, it fails 
> because port 8054 is already in use, leading to the exception.
> PR link: [TBD]



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

Reply via email to