[
https://issues.apache.org/jira/browse/YARN-4543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15122943#comment-15122943
]
Rohith Sharma K S commented on YARN-4543:
-----------------------------------------
+1 committing in. I reproduced the issue and applied the patch and ran again.
Test cases passes.
The reason for test failure is, AbstractService#stop first switch service state
to STOPPED and start stopping all the registered services. So even after
nm.getServiceState() is STOPPED, internally registered services stop takes few
seconds. But in the test, before all services get stopped, only checking for
nm.getServiceState does not help. So , need to wait for few seconds more.
> TestNodeStatusUpdater.testStopReentrant fails + JUnit misusage
> --------------------------------------------------------------
>
> Key: YARN-4543
> URL: https://issues.apache.org/jira/browse/YARN-4543
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: nodemanager
> Reporter: Akihiro Suda
> Priority: Minor
> Attachments: YARN-4543-1.patch
>
>
> {panel}
> TestNodeStatusUpdater.testStopReentrant:1269 expected:<0> but was:<1>
> {panel}
> https://github.com/apache/hadoop/blob/4ac6799d4a8b071e0d367c2d709e84d8ea06942d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java#L1269
> The corresponding JUnit assertion code is:
> {panel}
> Assert.assertEquals(numCleanups.get(), 1);
> {panel}
> It seems that the 1st arg and the 2nd one should be swapped.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)