[ 
https://issues.apache.org/jira/browse/YARN-11899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18040053#comment-18040053
 ] 

Steve Loughran commented on YARN-11899:
---------------------------------------

there is a before each, but it may be junit5 is calling that in a different 
place than junit4

maybe add a resetMetrics() operation and explicitly invoke it in each test case.

the test suite should also extend AbstractHadoopTestBase so it gets timeouts 
and some other features, especially the thread name changed, which is good for 
the logs

> TestRouterMetrics is order dependent
> ------------------------------------
>
>                 Key: YARN-11899
>                 URL: https://issues.apache.org/jira/browse/YARN-11899
>             Project: Hadoop YARN
>          Issue Type: Test
>            Reporter: Paco Chan
>            Priority: Trivial
>
> The following tests are order-dependent if interleaved with other tests:
> |org.apache.hadoop.yarn.server.router.TestRouterMetrics.testAppsFailedCreated|
> |org.apache.hadoop.yarn.server.router.TestRouterMetrics.testAppsFailedKilled|
> |org.apache.hadoop.yarn.server.router.TestRouterMetrics.testAppsFailedSubmitted|
> |org.apache.hadoop.yarn.server.router.TestRouterMetrics.testAppsReportFailed|
> |org.apache.hadoop.yarn.server.router.TestRouterMetrics.testMulipleAppsReportFailed|
> |org.apache.hadoop.yarn.server.router.TestRouterMetrics.testSucceededAppsCreated|
> |org.apache.hadoop.yarn.server.router.TestRouterMetrics.testSucceededAppsKilled|
> |org.apache.hadoop.yarn.server.router.TestRouterMetrics.testSucceededAppsReport|
> |org.apache.hadoop.yarn.server.router.TestRouterMetrics.testSucceededAppsSubmitted|
> |org.apache.hadoop.yarn.server.router.TestRouterMetrics.testSucceededMultipleAppsReport|
>  
> This is because there is some state in the metrics that is not cleaned after 
> the test is run. Some other tests can mutate the router metrics between tests.
>  
> To solve this problem, the metrics were reset after every test. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to