You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/12/05 06:05:00 UTC

[jira] [Work logged] (MAPREDUCE-7310) Fix flaky test TestJobHistoryEventHandler.testSigTermedFunctionality

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

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

                Author: ASF GitHub Bot
            Created on: 05/Dec/20 06:04
            Start Date: 05/Dec/20 06:04
    Worklog Time Spent: 10m 
      Work Description: lzx404243 commented on pull request #2499:
URL: https://github.com/apache/hadoop/pull/2499#issuecomment-739132471


   @jiwq Thanks for the review! Is there anything I can do on my end for this to be merged?


----------------------------------------------------------------
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:
users@infra.apache.org


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

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

> Fix flaky test TestJobHistoryEventHandler.testSigTermedFunctionality
> --------------------------------------------------------------------
>
>                 Key: MAPREDUCE-7310
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-7310
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>            Reporter: Zhengxi Li
>            Priority: Minor
>         Attachments: MAPREDUCE-7310.001.patch
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The test '{{org.apache.hadoop.mapreduce.jobhistory.TestJobHistoryEventHandler.testSigTermedFunctionality'}} 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 `TestJobHistoryEventHandler.testSigTermedFunctionality` twice would result in the second run failing due to `NullPointerException`shown in the following:
> {noformat}
>  java.lang.NullPointerException
>  at org.apache.hadoop.mapreduce.jobhistory.JobHistoryEventHandler.serviceStop(JobHistoryEventHandler.java:460)
>  at org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221)
>  at org.apache.hadoop.mapreduce.jobhistory.TestJobHistoryEventHandler.testSigTermedFunctionality(TestJobHistoryEventHandler.java:933)
> {noformat}
> The root cause of this is that running '{{TestJobHistoryEventHandler.testSigTermedFunctionality'}} results in some entries to be added to the static '{{JobHistoryEventHandler.fileMap'}}. The entries in the '{{fileMap'}} are not cleaned up when the test is done, resulting in a NullPointerException in the second run as the stale object(added in the first run) in the 'fileMap' is accessed.
>  
> PR link: https://github.com/apache/hadoop/pull/2499



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org