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 2021/09/02 13:02:58 UTC
[GitHub] [flink] ruanhang1993 commented on a change in pull request #17064: [FLINK-24059][Connectors/Common] Allow SourceReaderTestBase.NUM_SPLITS to be overridden
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-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org