ruanhang1993 commented on a change in pull request #17064: URL: https://github.com/apache/flink/pull/17064#discussion_r701060446
########## File path: flink-test-utils-parent/flink-connector-test-utils/src/main/java/org/apache/flink/connector/testutils/source/reader/SourceReaderTestBase.java ########## @@ -136,12 +145,12 @@ public void testSnapshot() throws Exception { ValidatingSourceOutput output = new ValidatingSourceOutput(); // Add a split to start the fetcher. List<SplitT> splits = - getSplits(NUM_SPLITS, NUM_RECORDS_PER_SPLIT, Boundedness.CONTINUOUS_UNBOUNDED); + getSplits(numSplits, NUM_RECORDS_PER_SPLIT, Boundedness.CONTINUOUS_UNBOUNDED); try (SourceReader<Integer, SplitT> reader = - consumeRecords(splits, output, NUM_SPLITS * NUM_RECORDS_PER_SPLIT)) { Review comment: I prefer to use the `getTotalNumRecords` method to replace all the logic `numSplits * NUM_RECORDS_PER_SPLIT` where means to get the total number of records. -- 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-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org