[ https://issues.apache.org/jira/browse/YARN-9470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16819785#comment-16819785 ]
Akira Ajisaka commented on YARN-9470: ------------------------------------- Thank you for the cleanup, [~Prabhu Joseph]! * In TestYarnNativeServices.java L907, the arguments are the same. I think we can improve the usage of AssertJ API can be improved as follows: * In TestAMRMClientAsync.java L600, {{assertThat(Throwable).hasMessage(String)}} is available. * In TestAHSWebServices.java L682, L693, {{assertThat(byte[]).hasSize(int)}} is available. * In BasePolicyManagerTest.java L96, L99, {{assertThat(Object).isExactlyInstanceOf(Class<?>)}} is available. * In TestContainerLaunch.java L1490, L1513, L1537, L1563, L1595, {{assertThat(Throwable).hasMessageContaining(String)}} is available. > Fix order of actual and expected expression in assert statements > ---------------------------------------------------------------- > > Key: YARN-9470 > URL: https://issues.apache.org/jira/browse/YARN-9470 > Project: Hadoop YARN > Issue Type: Improvement > Components: yarn > Affects Versions: 3.2.0 > Reporter: Prabhu Joseph > Assignee: Prabhu Joseph > Priority: Major > Attachments: YARN-9470-001.patch, YARN-9470-002.patch, > YARN-9470-003.patch, assertEquals > > > Fix order of actual and expected expression in assert statements which gives > misleading message when test case fails. Attached file has some of the places > where it is placed wrongly. > {code} > [ERROR] > testNodeRemovalGracefully(org.apache.hadoop.yarn.server.resourcemanager.TestResourceTrackerService) > Time elapsed: 3.385 s <<< FAILURE! > java.lang.AssertionError: Shutdown nodes should be 0 now expected:<1> but > was:<0> > {code} > For long term, [AssertJ|http://joel-costigliola.github.io/assertj/] can be > used for new test cases which avoids such mistakes. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org