Skip to content

Commit d3cf911

Browse files
committed
[FLINK-23628][metrics][influxdb] Fix test setup
1 parent 080e028 commit d3cf911

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

flink-metrics/flink-metrics-influxdb/src/test/java/org/apache/flink/metrics/influxdb/MeasurementInfoProviderTest.java

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public void simpleTestGetMetricInfo() {
6969

7070
@Test
7171
public void testNormalizingTags() {
72+
String logicalScope = "myService.Status.JVM.ClassLoader";
7273
Map<String, String> variables = new HashMap<>();
7374
variables.put("<A\n>", "a\n");
7475

@@ -79,6 +80,7 @@ public void testNormalizingTags() {
7980
throw new UnsupportedOperationException("unexpected method call");
8081
});
8182
doReturn(variables).when(metricGroup).getAllVariables();
83+
doReturn(logicalScope).when(metricGroup).getLogicalScope(any(), anyChar());
8284

8385
MeasurementInfo info = provider.getMetricInfo("m1", metricGroup);
8486
assertThat(info.getTags(), hasEntry("A", "a"));

0 commit comments

Comments
 (0)