[ https://issues.apache.org/jira/browse/FLINK-1595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14376441#comment-14376441 ]
ASF GitHub Bot commented on FLINK-1595: --------------------------------------- Github user rmetzger commented on a diff in the pull request: https://github.com/apache/flink/pull/520#discussion_r26969917 --- Diff: flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/complex/ComplexIntegrationTest.java --- @@ -0,0 +1,903 @@ +/* + * 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.complex; + +import org.apache.flink.api.common.functions.FilterFunction; +import org.apache.flink.api.common.functions.FlatMapFunction; +import org.apache.flink.api.common.functions.MapFunction; +import org.apache.flink.api.common.functions.RichFilterFunction; +import org.apache.flink.api.java.tuple.Tuple2; +import org.apache.flink.api.java.tuple.Tuple4; +import org.apache.flink.api.java.tuple.Tuple5; +import org.apache.flink.configuration.Configuration; +import org.apache.flink.streaming.api.collector.selector.OutputSelector; +import org.apache.flink.streaming.api.datastream.DataStream; +import org.apache.flink.streaming.api.datastream.IterativeDataStream; +import org.apache.flink.streaming.api.datastream.SplitDataStream; +import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; +import org.apache.flink.streaming.api.function.WindowMapFunction; +import org.apache.flink.streaming.api.function.co.CoMapFunction; +import org.apache.flink.streaming.api.function.sink.SinkFunction; +import org.apache.flink.streaming.api.function.source.SourceFunction; +import org.apache.flink.streaming.api.windowing.deltafunction.DeltaFunction; +import org.apache.flink.streaming.api.windowing.helper.Count; +import org.apache.flink.streaming.api.windowing.helper.Delta; +import org.apache.flink.streaming.api.windowing.helper.Time; +import org.apache.flink.streaming.api.windowing.helper.Timestamp; +import org.apache.flink.streaming.util.RectangleClass; +import org.apache.flink.streaming.util.TestStreamEnvironment; +import org.apache.flink.util.Collector; +import org.junit.Test; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.assertEquals; + +public class ComplexIntegrationTest implements Serializable { + private static final long serialVersionUID = 1L; + private static final long MEMORYSIZE = 32; + + private static Map<String, List<String>> results = new HashMap<String, List<String>>(); + + @SuppressWarnings("unchecked") + public static List<Tuple5<Integer, String, Character, Double, Boolean>> input = Arrays.asList( + new Tuple5<Integer, String, Character, Double, Boolean>(1, "apple", 'j', 0.1, false), + new Tuple5<Integer, String, Character, Double, Boolean>(1, "peach", 'b', 0.8, true), + new Tuple5<Integer, String, Character, Double, Boolean>(1, "orange", 'c', 0.7, false), + new Tuple5<Integer, String, Character, Double, Boolean>(2, "apple", 'd', 0.5, false), + new Tuple5<Integer, String, Character, Double, Boolean>(2, "apple", 'e', 0.6, false), + new Tuple5<Integer, String, Character, Double, Boolean>(3, "peach", 'a', 0.2, true), + new Tuple5<Integer, String, Character, Double, Boolean>(6, "peanut", 'b', 0.1, true), + new Tuple5<Integer, String, Character, Double, Boolean>(7, "banana", 'c', 0.4, false), + new Tuple5<Integer, String, Character, Double, Boolean>(8, "peanut", 'd', 0.2, false), + new Tuple5<Integer, String, Character, Double, Boolean>(10, "cherry", 'e', 0.1, false), + new Tuple5<Integer, String, Character, Double, Boolean>(10, "plum", 'a', 0.5, true), + new Tuple5<Integer, String, Character, Double, Boolean>(11, "strawberry", 'b', 0.3, false), + new Tuple5<Integer, String, Character, Double, Boolean>(11, "orange", 'c', 0.3, true), + new Tuple5<Integer, String, Character, Double, Boolean>(12, "lemon", 'd', 0.9, false), + new Tuple5<Integer, String, Character, Double, Boolean>(13, "apple", 'e', 0.7, false), + new Tuple5<Integer, String, Character, Double, Boolean>(15, "lemon", 'a', 0.2, false), + new Tuple5<Integer, String, Character, Double, Boolean>(16, "apple", 'b', 0.8, true), + new Tuple5<Integer, String, Character, Double, Boolean>(16, "banana", 'c', 0.8, false), + new Tuple5<Integer, String, Character, Double, Boolean>(16, "orange", 'd', 0.1, false), + new Tuple5<Integer, String, Character, Double, Boolean>(17, "cherry", 'e', 1.0, false)); + +// @Test --- End diff -- It would be great to have a quick summary (one or two lines) what the test is doing. That helps a lot understanding the code. > Add a complex integration test for Streaming API > ------------------------------------------------ > > Key: FLINK-1595 > URL: https://issues.apache.org/jira/browse/FLINK-1595 > Project: Flink > Issue Type: Task > Components: Streaming > Reporter: Gyula Fora > Assignee: Péter Szabó > Labels: Starter > > The streaming tests currently lack a sophisticated integration test that > would test many api features at once. > This should include different merging, partitioning, grouping, aggregation > types, as well as windowing and connected operators. > The results should be tested for correctness. > A test like this would help identifying bugs that are hard to detect by > unit-tests. -- This message was sent by Atlassian JIRA (v6.3.4#6332)