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/04/24 14:05:05 UTC
[GitHub] [flink] reswqa commented on a diff in pull request #19563: [WIP][FLINK-25537] [JUnit5 Migration] Module: flink-core
reswqa commented on code in PR #19563:
URL: https://github.com/apache/flink/pull/19563#discussion_r857131608
##########
flink-core/src/test/java/org/apache/flink/api/common/accumulators/AverageAccumulatorTest.java:
##########
@@ -94,20 +93,20 @@ public void testMergeSuccess() {
}
avg1.merge(avg2);
- assertEquals(4.5, avg1.getLocalValue(), 0.0);
+ assertThat(4.5, avg1.getLocalValue(), 0.0);
}
@Test
- public void testMergeFailed() {
+ void testMergeFailed() {
AverageAccumulator average = new AverageAccumulator();
Accumulator<Double, Double> averageNew = null;
average.add(1);
try {
average.merge(averageNew);
fail("should fail with an exception");
} catch (IllegalArgumentException e) {
- assertNotNull(e.getMessage());
Review Comment:
Might replace this code block by assertThatThrownBy
--
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