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/05/11 08:22:18 UTC

[GitHub] [flink] alpreu commented on a diff in pull request #19660: [FLINK-27185][connectors] Convert connector modules to assertj

alpreu commented on code in PR #19660:
URL: https://github.com/apache/flink/pull/19660#discussion_r870011592


##########
flink-connectors/flink-connector-base/src/test/java/org/apache/flink/connector/base/source/reader/fetcher/SplitFetcherTest.java:
##########
@@ -230,15 +229,15 @@ public void run() {
                 while (nextBatch.nextSplit() != null) {
                     int[] arr;
                     while ((arr = nextBatch.nextRecordFromSplit()) != null) {
-                        assertTrue(recordsRead.add(arr[0]));
+                        assertThat(recordsRead.add(arr[0])).isTrue();
                     }
                 }
             }
 
-            assertEquals(numTotalRecords, recordsRead.size());
-            assertEquals(0, (int) recordsRead.first());
-            assertEquals(numTotalRecords - 1, (int) recordsRead.last());
-            assertTrue(wakeupTimes.get() > 0);
+            assertThat(recordsRead).hasSize(numTotalRecords);
+            assertThat((int) recordsRead.first()).isEqualTo(0);

Review Comment:
   I just checked and it looks like they aren't necessary, I'll remove them



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