Github user srdo commented on a diff in the pull request: https://github.com/apache/storm/pull/2754#discussion_r209046204 --- Diff: storm-server/src/test/java/org/apache/storm/metric/StormMetricsRegistryTest.java --- @@ -0,0 +1,108 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.storm.metric; + +import com.codahale.metrics.Meter; +import com.codahale.metrics.Metric; +import com.codahale.metrics.MetricSet; +import com.codahale.metrics.Timer; +import org.junit.jupiter.api.Test; + +import java.util.HashMap; +import java.util.Map; + +import static com.codahale.metrics.MetricRegistry.name; +import static org.junit.jupiter.api.Assertions.*; + +class StormMetricsRegistryTest { + + private static final String OUTER_METER = "outerMeter"; + private static final String INNER_SET = "innerSet"; + private static final String OUTER_TIMER = "outerTimer"; + private static final String INNER_METER = "innerMeter"; + private static final String INNER_TIMER = "innerTimer"; + private static final MetricSet OUTER = newMetricSetInstance(); + + @Test + void registerMetricSet() { + Meter existingInnerMeter = StormMetricsRegistry.registerMeter(name(INNER_SET, INNER_METER)); + + System.out.println("register outer set"); --- End diff -- Please use a Logger instead, I think System.out ends up in the console, whereas all the other logs go to files when we run tests.
---