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 2019/01/15 14:26:25 UTC

[GitHub] yanghua commented on a change in pull request #7470: [FLINK-11283] Accessing the key when processing connected keyed stream

yanghua commented on a change in pull request #7470: [FLINK-11283] Accessing the key when processing connected keyed stream
URL: https://github.com/apache/flink/pull/7470#discussion_r247911696
 
 

 ##########
 File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/co/KeyedCoProcessOperatorTest.java
 ##########
 @@ -18,115 +18,70 @@
 
 package org.apache.flink.streaming.api.operators.co;
 
-import org.apache.flink.api.common.state.ValueState;
-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.functions.KeySelector;
-import org.apache.flink.runtime.checkpoint.OperatorSubtaskState;
 import org.apache.flink.streaming.api.TimeDomain;
-import org.apache.flink.streaming.api.TimerService;
-import org.apache.flink.streaming.api.functions.co.CoProcessFunction;
+import org.apache.flink.streaming.api.functions.co.KeyedCoProcessFunction;
 import org.apache.flink.streaming.api.watermark.Watermark;
 import org.apache.flink.streaming.runtime.streamrecord.StreamRecord;
 import org.apache.flink.streaming.util.KeyedTwoInputStreamOperatorTestHarness;
 import org.apache.flink.streaming.util.TestHarnessUtil;
 import org.apache.flink.streaming.util.TwoInputStreamOperatorTestHarness;
 import org.apache.flink.util.Collector;
-import org.apache.flink.util.TestLogger;
 
 import org.junit.Test;
 
-import java.io.IOException;
 import java.util.concurrent.ConcurrentLinkedQueue;
 
 import static org.junit.Assert.assertEquals;
 
 /**
  * Tests {@link KeyedCoProcessOperator}.
  */
-public class KeyedCoProcessOperatorTest extends TestLogger {
+public class KeyedCoProcessOperatorTest extends LegacyKeyedCoProcessOperatorTest {
 
 	@Test
-	public void testTimestampAndWatermarkQuerying() throws Exception {
 
 Review comment:
   I mainly don't want to introduce too many repeated tests here. In fact, `KeyedCoProcessOperator` is very similar to `LegacyKeyedCoProcessOperator`. The main difference is the handling of keys.
   
   The deletion of these methods appears here because it originally belonged to `LegacyKeyedCoProcessOperatorTest` (old `KeyedCoProcessOperatorTest`). As far as the current `KeyedCoProcessOperatorTest` is concerned, I think we only need to focus on verifying the correctness of `getCurrentKey`. Here I let `KeyedCoProcessOperatorTest` inherit `LegacyKeyedCoProcessOperatorTest` to reuse some of the code. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services