becketqin commented on a change in pull request #17064: URL: https://github.com/apache/flink/pull/17064#discussion_r700903992
########## File path: flink-test-utils-parent/flink-connector-test-utils/src/main/java/org/apache/flink/connector/testutils/source/reader/SourceReaderTestBase.java ########## @@ -49,9 +50,17 @@ Licensed to the Apache Software Foundation (ASF) under one */ public abstract class SourceReaderTestBase<SplitT extends SourceSplit> extends TestLogger { - protected static final int NUM_SPLITS = 10; + protected static int numSplits; Review comment: Hmm, if this variable is static and more than 2 test cases inheriting the `SourceReaderTestBase` are running concurrently, they may interfere with each other. We probably want to make this variable non-static. Maybe we can do the following: 1. Make `numSplits` and `totalNumRecords` private final. 2. Add a new method `int getNumSplits()`; 3. In the default constructor of `SourceReaderTestBase`, set the `numSplits` to `getNumSplits()` and compute the `totalNumRecords` accordingly. The concrete test classes can then change the numSplits by overriding the method of `getNumSpltis()`. -- 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