yulei0824 commented on a change in pull request #16645:
URL: https://github.com/apache/flink/pull/16645#discussion_r681406202
##########
File path:
flink-metrics/flink-metrics-influxdb/src/test/java/org/apache/flink/metrics/influxdb/MeasurementInfoProviderTest.java
##########
@@ -56,9 +78,26 @@ public void simpleTestGetMetricInfo() {
assertEquals(
String.join("" + MeasurementInfoProvider.SCOPE_SEPARATOR,
logicalScope, metricName),
info.getName());
- assertThat(info.getTags(), hasEntry("A", "a"));
- assertThat(info.getTags(), hasEntry("B", "b"));
- assertThat(info.getTags(), hasEntry("C", "c"));
+ assertThat(info.getTags(), hasEntry(KEY1, VALUE1));
+ assertThat(info.getTags(), hasEntry(KEY2, VALUE2));
+ assertThat(info.getTags(), hasEntry(KEY3, VALUE3));
assertEquals(3, info.getTags().size());
}
+
+ private static Map<String, String> generateVariables(boolean isDelimited) {
+ Map<String, String> variables = new HashMap<>();
+ variables.put(String.format("<%s>", make(KEY1, isDelimited)),
make(VALUE1, isDelimited));
+ variables.put(String.format("<%s>", make(KEY2, isDelimited)),
make(VALUE2, isDelimited));
+ variables.put(String.format("<%s>", make(KEY3, isDelimited)),
make(VALUE3, isDelimited));
+ return variables;
+ }
+
+ private static String make(String value, boolean isDelimited) {
+ return isDelimited ? delimit(value) : value;
Review comment:
ok
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]