[
https://issues.apache.org/jira/browse/HADOOP-19820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18086833#comment-18086833
]
ASF GitHub Bot commented on HADOOP-19820:
-----------------------------------------
pan3793 commented on code in PR #8534:
URL: https://github.com/apache/hadoop/pull/8534#discussion_r3370637762
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancerLongRunningTasks.java:
##########
@@ -823,17 +824,20 @@ public void testBalancerMetricsDuplicate() throws
Exception {
// Throw an error when we double-initialize BalancerMetrics
DefaultMetricsSystem.setMiniClusterMode(false);
- MetricsSystem instance = DefaultMetricsSystem.instance();
- // Avoid the impact of cluster metric, remove cluster JvmMetrics
- instance.unregisterSource("JvmMetrics");
-
- final BalancerParameters balancerParameters = Balancer.Cli.parse(new
String[] {
- "-policy", BalancingPolicy.Node.INSTANCE.getName(),
- "-threshold", "10",
- });
- int r = Balancer.run(namenodes, nsIds, balancerParameters, conf);
- assertEquals(ExitStatus.SUCCESS.getExitCode(), r);
- DefaultMetricsSystem.setMiniClusterMode(true);
+ try {
+ MetricsSystem instance = DefaultMetricsSystem.instance();
+ // Avoid the impact of cluster metric, remove cluster JvmMetrics
Review Comment:
changed to memorize the prior state and restore it in the `finally` block
> Uber-JIRA: CI and Test Improvements
> -----------------------------------
>
> Key: HADOOP-19820
> URL: https://issues.apache.org/jira/browse/HADOOP-19820
> Project: Hadoop Common
> Issue Type: Improvement
> Components: build, test, yetus
> Affects Versions: 3.5.0
> Reporter: Aaron Fabbri
> Assignee: Aaron Fabbri
> Priority: Major
> Labels: pull-request-available
>
> Epic to organize all tasks related to CI performance and quality of life
> (QoL) improvements. Some areas that need love:
> h2. UX / DevEx
> * Easier to navigate to CI failure root cause.
> * Less noise comments in issues / PRs.
> h2. Stability
> * Fix or replace flaky tests.
> h2. Speed
> Faster execution time. We occasionally are blocked on CI runs that take over
> 24 hours:
> [https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8225/8/]
> Other runs tend to take ~3 hours. Ideally CI should be as fast as possible
> (10-30 minutes is ideal, if unrealistic).
> h2. Coverage
> Reduce manual testing steps, e.g. for cloud storage connectors.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]