[
https://issues.apache.org/jira/browse/YARN-11899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18045024#comment-18045024
]
ASF GitHub Bot commented on YARN-11899:
---------------------------------------
18chanp1 opened a new pull request, #8133:
URL: https://github.com/apache/hadoop/pull/8133
### Description of PR
The following tests are order dependent if they are interleaved with some
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
```
I believe this is because the Router is being used by some other module,
causing the statistics to be inaccurate. To address this problem,
``RouterMetrics`` should be reset before and after every test. This PR creates
a setup and teardown to perform this action
### How was this patch tested?
Existing tests in TestRouterMetrics that pass continue to pass, and tests
that fail in TestRouterMetrics continue to fail.
### For code changes:
- [X] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [X] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [X] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [X] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
> 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]