You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/02/17 21:52:37 UTC
[GitHub] [flink] zentol commented on a change in pull request #18821: [FLINK-26219][slf4j] Migrate tests to JUnit5
zentol commented on a change in pull request #18821:
URL: https://github.com/apache/flink/pull/18821#discussion_r809498109
##########
File path: flink-metrics/flink-metrics-slf4j/src/test/java/org/apache/flink/metrics/slf4j/Slf4jReporterTest.java
##########
@@ -101,16 +96,17 @@ public void testAddGauge() throws Exception {
+ ": null";
reporter.report();
- assertThat(testLoggerResource.getMessages(), hasItem(containsString(expectedGaugeReport)));
+ assertThat(testLoggerResource.getMessages())
+ .anyMatch(logOutput -> logOutput.contains(expectedGaugeReport));
}
@Test
- public void testAddMeter() throws Exception {
+ void testAddMeter() throws Exception {
String meterName = "meter";
Meter meter = new MeterView(5);
reporter.notifyOfAddedMetric(meter, meterName, metricGroup);
- assertTrue(reporter.getMeters().containsKey(meter));
+ assertThat(reporter.getMeters().containsKey(meter));
Review comment:
oh boy this is gonna be fun to double-check in the future :/
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org