Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-7342

Stop RMService in TestClientRedirect.testRedirect()

    XMLWordPrintableJSON

Details

    Description

      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.

      PR link: https://github.com/apache/hadoop/pull/2968

      Attachments

        Issue Links

          Activity

            People

              lzx404243 Zhengxi Li
              lzx404243 Zhengxi Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m