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

[jira] [Commented] (YARN-11694) 2 tests are non-idempotent (passes in the first run but fails in repeated runs in the same JVM)

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

ASF GitHub Bot commented on YARN-11694:
---------------------------------------

github-actions[bot] commented on PR #6793:
URL: https://github.com/apache/hadoop/pull/6793#issuecomment-3340861251

   We're closing this stale PR because it has been open for 100 days with no activity. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you feel like this was a mistake, or you would like to continue working on it, please feel free to re-open it and ask for a committer to remove the stale tag and review again.
   Thanks all for your contribution.




> 2 tests are non-idempotent (passes in the first run but fails in repeated runs in the same JVM)
> -----------------------------------------------------------------------------------------------
>
>                 Key: YARN-11694
>                 URL: https://issues.apache.org/jira/browse/YARN-11694
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Kaiyao Ke
>            Priority: Major
>              Labels: pull-request-available
>
> ## TestTimelineReaderMetrics#testTimelineReaderMetrics
> `org.apache.hadoop.yarn.server.timelineservice.reader.TestTimelineReaderMetrics#testTimelineReaderMetrics` does not perform a source unregistration after test execution, so the `TimelineReaderMetrics.getInstance()` call in repeated runs will throw an error since the metrics source `TimelineReaderMetrics` already exists.
> Error message in the 2nd run:
> ```
> org.apache.hadoop.metrics2.MetricsException: Metrics source TimelineReaderMetrics already exists!
>  at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.newSourceName(DefaultMetricsSystem.java:152)
>  at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.sourceName(DefaultMetricsSystem.java:125)
>  at org.apache.hadoop.metrics2.impl.MetricsSystemImpl.register(MetricsSystemImpl.java:229)
>  at org.apache.hadoop.yarn.server.timelineservice.metrics.TimelineReaderMetrics.getInstance(TimelineReaderMetrics.java:61)
>  at org.apache.hadoop.yarn.server.timelineservice.reader.TestTimelineReaderMetrics.setup(TestTimelineReaderMetrics.java:52)
>  at java.base/java.lang.reflect.Method.invoke(Method.java:568)
>  at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
>  at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
> ```
>  
> ## TestFederationStateStoreClientMetrics#testSuccessfulCalls
> `org.apache.hadoop.yarn.server.federation.store.metrics.TestFederationStateStoreClientMetrics#testSuccessfulCalls` retrieves the historical number of successful calls, but does not retrieve the historical average latency of those calls. For example, it asserts  `FederationStateStoreClientMetrics.getLatencySucceededCalls()` is 100 after the `goodStateStore.registerSubCluster(100);` call. However, in the second execution of the test, 2 historical calls from the first execution (with latency 100 and 200 respectively) has already been recorded, so `FederationStateStoreClientMetrics.getLatencySucceededCalls()` will be 133.3333 (mean of 100, 200 and 100)
>  
> Error message in the 2nd run:
> ```
> java.lang.AssertionError: expected:<100.0> but was:<133.33333333333334>
>  at org.junit.Assert.fail(Assert.java:89)
>  at org.junit.Assert.failNotEquals(Assert.java:835)
>  at org.junit.Assert.assertEquals(Assert.java:555)
>  at org.junit.Assert.assertEquals(Assert.java:685)
>  at org.apache.hadoop.yarn.server.federation.store.metrics.TestFederationStateStoreClientMetrics.testSuccessfulCalls(TestFederationStateStoreClientMetrics.java:63)
>  at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> ```



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

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