mateczagany commented on code in PR #27669:
URL: https://github.com/apache/flink/pull/27669#discussion_r2868458182


##########
flink-tests/src/test/java/org/apache/flink/test/accumulators/AccumulatorITCase.java:
##########
@@ -84,28 +84,30 @@ protected void postSubmit() throws Exception {
         JobExecutionResult res = this.result;
         
System.out.println(AccumulatorHelper.getResultsFormatted(res.getAllAccumulatorResults()));
 
-        Assert.assertEquals(Integer.valueOf(3), 
res.getAccumulatorResult("num-lines"));
+        
assertThat(res.<Integer>getAccumulatorResult("num-lines")).isEqualTo(Integer.valueOf(3));
 
-        Assert.assertEquals(
-                Double.valueOf(getParallelism()), 
res.getAccumulatorResult("open-close-counter"));
+        assertThat(res.<Double>getAccumulatorResult("open-close-counter"))
+                .isEqualTo(Double.valueOf(getParallelism()));
 
         // Test histogram (words per line distribution)
         Map<Integer, Integer> dist = new HashMap<>();
         dist.put(1, 1);
         dist.put(2, 1);
         dist.put(3, 1);
-        Assert.assertEquals(dist, res.getAccumulatorResult("words-per-line"));
+        assertThat(res.<Map<Integer, 
Integer>>getAccumulatorResult("words-per-line"))
+                .isEqualTo(dist);
 
         // Test distinct words (custom accumulator)
         Set<StringValue> distinctWords = new HashSet<>();
         distinctWords.add(new StringValue("one"));
         distinctWords.add(new StringValue("two"));
         distinctWords.add(new StringValue("three"));
-        Assert.assertEquals(distinctWords, 
res.getAccumulatorResult("distinct-words"));
+        
assertThat(res.<Set<StringValue>>getAccumulatorResult("distinct-words"))
+                .isEqualTo(distinctWords);

Review Comment:
   Good idea, thank you.



-- 
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]

Reply via email to