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


##########
flink-tests/src/test/java/org/apache/flink/test/accumulators/AccumulatorITCase.java:
##########
@@ -167,25 +162,15 @@ public void open(OpenContext openContext) {
             // Create counter and test increment
             IntCounter simpleCounter = 
getRuntimeContext().getIntCounter("simple-counter");
             simpleCounter.add(1);
-            Assert.assertEquals(simpleCounter.getLocalValue().intValue(), 1);
+            assertThat(simpleCounter.getLocalValue().intValue()).isEqualTo(1);

Review Comment:
   ```suggestion
               assertThat(simpleCounter.getLocalValue().intValue()).isOne();
   ```



##########
flink-tests/src/test/java/org/apache/flink/test/recovery/TaskManagerDisconnectOnShutdownITCase.java:
##########


Review Comment:
   ```suggestion
               assertThat(tracker.getNumberOfConnectedTaskManager()).isOne();
   ```



##########
flink-tests/src/test/java/org/apache/flink/test/runtime/TaskManagerLoadingDynamicPropertiesITCase.java:
##########
@@ -93,7 +91,7 @@ public void testLoadingDynamicPropertiesInBash() throws 
Exception {
             if (!process.waitFor(10, TimeUnit.SECONDS)) {
                 throw new Exception("TestingTaskManagerRunner did not shutdown 
in time.");
             }
-            assertEquals(processOutput.toString(), 0, process.exitValue());
+            
assertThat(process.exitValue()).as(processOutput.toString()).isEqualTo(0);

Review Comment:
   ```suggestion
               
assertThat(process.exitValue()).as(processOutput.toString()).isZero();
   ```



##########
flink-tests/src/test/java/org/apache/flink/test/misc/MiscellaneousIssuesITCase.java:
##########
@@ -127,6 +127,6 @@ public void flatMap(Long value, Collector<Long> out) {
 
         JobExecutionResult result = env.execute();
 
-        assertEquals(1000000L, result.getAllAccumulatorResults().get(accName));
+        
assertThat(result.getAllAccumulatorResults().get(accName)).isEqualTo(1000000L);

Review Comment:
   ```suggestion
           assertThat(result.getAllAccumulatorResults()).containsEntry(accName, 
1000000L);
   ```



##########
flink-tests/src/test/java/org/apache/flink/test/state/SavepointStateBackendSwitchTestBase.java:
##########
@@ -280,52 +279,49 @@ private void verifyRestoredState(
 
         keyedBackend.setCurrentKey("abc");
         mapState.setCurrentNamespace(namespace1);
-        assertEquals(33L, (long) mapState.get(33L));
-        assertEquals(55L, (long) mapState.get(55L));
-        assertEquals(2, getStateSize(mapState));
+        assertThat(mapState.get(33L)).isEqualTo(33L);
+        assertThat(mapState.get(55L)).isEqualTo(55L);
+        assertThat(getStateSize(mapState)).isEqualTo(2);
 
         mapState.setCurrentNamespace(namespace2);
-        assertEquals(22L, (long) mapState.get(22L));
-        assertEquals(11L, (long) mapState.get(11L));
-        assertEquals(2, getStateSize(mapState));
+        assertThat(mapState.get(22L)).isEqualTo(22L);
+        assertThat(mapState.get(11L)).isEqualTo(11L);
+        assertThat(getStateSize(mapState)).isEqualTo(2);
         listState.setCurrentNamespace(namespace2);
-        assertThat(listState.get(), contains(4L, 5L, 6L));
+        assertThat(listState.get()).containsExactly(4L, 5L, 6L);
 
         mapState.setCurrentNamespace(namespace3);
-        assertEquals(44L, (long) mapState.get(44L));
-        assertEquals(1, getStateSize(mapState));
+        assertThat(mapState.get(44L)).isEqualTo(44L);
+        assertThat(getStateSize(mapState)).isEqualTo(1);

Review Comment:
   ```suggestion
           assertThat(getStateSize(mapState)).isOne();
   ```



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