syhily commented on code in PR #21252: URL: https://github.com/apache/flink/pull/21252#discussion_r1019825570
########## flink-connectors/flink-connector-pulsar/src/test/java/org/apache/flink/connector/pulsar/testutils/function/ControlSource.java: ########## @@ -183,37 +191,58 @@ public List<String> getExpectedRecords() { private static class StopSignal implements Closeable { private static final Logger LOG = LoggerFactory.getLogger(StopSignal.class); - private final String topic; private final int desiredCounts; // This is a thread-safe list. private final List<String> consumedRecords; private final AtomicLong deadline; private final ExecutorService executor; + private final Consumer<String> consumer; Review Comment: This `Consumer` is created and used in `ControlSource` with an `SharedReference`. Because we may use it both in a Flink testing instance and the testing code for consuming the messages from Pulsar and judge if we can stop this application. It's quite ok to remove it. But I prefer to keep it with a close method. I'll add it in next commit. -- 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