PatrickRen commented on a change in pull request #18547: URL: https://github.com/apache/flink/pull/18547#discussion_r800373744
########## File path: flink-test-utils-parent/flink-connector-test-utils/src/test/java/org/apache/flink/connector/testframe/utils/TestDataMatchersTest.java ########## @@ -0,0 +1,163 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.connector.testframe.utils; + +import org.apache.flink.streaming.api.CheckpointingMode; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; + +/** Unit test for {@link TestDataMatchers}. */ +public class TestDataMatchersTest { + @Nested + class MultipleSplitDataMatcherTest { Review comment: What about change the name of this nested class to `ExactlyOnceSplitDataMatcherTest`, and add another test class for validating at-least-once mode? ########## File path: flink-test-utils-parent/flink-connector-test-utils/src/main/java/org/apache/flink/connector/testframe/testsuites/SourceTestSuiteBase.java ########## @@ -86,6 +93,8 @@ public abstract class SourceTestSuiteBase<T> { private static final Logger LOG = LoggerFactory.getLogger(SourceTestSuiteBase.class); + static ExecutorService executorService = Review comment: Can we wrap this `ExecutorService` into util classes? ########## File path: flink-test-utils-parent/flink-connector-test-utils/src/main/java/org/apache/flink/connector/testframe/utils/TestDataMatchers.java ########## @@ -33,180 +36,194 @@ Review comment: Actually this `TestDataMatchers` is a little bit hack because it bases on non-public implementation of Hamcrest matchers. I made a commit for rewriting this `TestDataMatchers` with AssertJ-style Assertions: https://github.com/PatrickRen/flink/commit/56d6e0a83d55884f605e8949d0349c0ebf64f2d3 Feel free to cherry-pick it into your PR -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
