AHeise commented on a change in pull request #11467: [FLINK-16317][operators] 
Provide support for watermarks, key selector and latency marker in 
MultipleInputStreamOperator
URL: https://github.com/apache/flink/pull/11467#discussion_r396988936
 
 

 ##########
 File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/AbstractStreamOperatorV2Test.java
 ##########
 @@ -0,0 +1,136 @@
+/*
+ * 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.streaming.api.operators;
+
+import org.apache.flink.api.common.state.ValueStateDescriptor;
+import org.apache.flink.api.common.typeinfo.BasicTypeInfo;
+import org.apache.flink.api.common.typeutils.base.StringSerializer;
+import org.apache.flink.api.java.tuple.Tuple2;
+import org.apache.flink.runtime.state.VoidNamespace;
+import org.apache.flink.runtime.state.VoidNamespaceSerializer;
+import org.apache.flink.streaming.runtime.streamrecord.StreamRecord;
+import org.apache.flink.streaming.util.KeyedOneInputStreamOperatorTestHarness;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Tests for the facilities provided by {@link AbstractStreamOperatorV2}.
+ */
+public class AbstractStreamOperatorV2Test extends AbstractStreamOperatorTest {
+       @Override
+       protected KeyedOneInputStreamOperatorTestHarness<Integer, 
Tuple2<Integer, String>, String> createTestHarness(
+                       int maxParalelism,
+                       int numSubtasks,
+                       int subtaskIndex) throws Exception {
+               return new KeyedOneInputStreamOperatorTestHarness<>(
+                       new TestOperatorFactory(),
+                       new TestKeySelector(),
+                       BasicTypeInfo.INT_TYPE_INFO,
+                       maxParalelism,
+                       numSubtasks,
+                       subtaskIndex);
+       }
+
+       private static class TestOperatorFactory extends 
AbstractStreamOperatorFactory<String> {
+               @Override
+               public <T extends StreamOperator<String>> T 
createStreamOperator(StreamOperatorParameters<String> parameters) {
+                       return (T) new TestOperator(parameters);
+               }
+
+               @Override
+               public Class<? extends StreamOperator> 
getStreamOperatorClass(ClassLoader classLoader) {
+                       return TestOperator.class;
+               }
+       }
+
+       /**
+        * Testing operator that can respond to commands by either 
setting/deleting state, emitting
+        * state or setting timers.
+        */
+       private static class TestOperator
 
 Review comment:
   `SingleInputTestOperator`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to