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 2021/03/04 09:55:35 UTC

[GitHub] [flink] dannycranmer opened a new pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

dannycranmer opened a new pull request #15085:
URL: https://github.com/apache/flink/pull/15085


   ## What is the purpose of the change
   
   Adding an end to end test for Kinesis Table API using Kinesalite.
   This supersedes [#15040](https://github.com/apache/flink/pull/15040), I deleted/created the branch instead of force push and it closed the PR.
   
   ## Brief change log
   
   - Added a reusable `KinesaliteContainer`
   - Added an `IT` test to execute SQL using Kinesis Table API source and sink, and verify the results
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   - Running `mvn clean install` on `flink-streaming-kinesis-test`
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): yes (e2e test only)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: yes
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15085:
URL: https://github.com/apache/flink/pull/15085#issuecomment-790506028


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14113",
       "triggerID" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e6612636b6ac6f6aee7cb8d6c126f996ed61e254",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14294",
       "triggerID" : "e6612636b6ac6f6aee7cb8d6c126f996ed61e254",
       "triggerType" : "PUSH"
     }, {
       "hash" : "899b0734e44859288a8df75228c1659f78076bd8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14505",
       "triggerID" : "899b0734e44859288a8df75228c1659f78076bd8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 899b0734e44859288a8df75228c1659f78076bd8 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14505) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15085:
URL: https://github.com/apache/flink/pull/15085#issuecomment-790506028


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14113",
       "triggerID" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14113) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15085:
URL: https://github.com/apache/flink/pull/15085#issuecomment-790506028


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14113",
       "triggerID" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e6612636b6ac6f6aee7cb8d6c126f996ed61e254",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14294",
       "triggerID" : "e6612636b6ac6f6aee7cb8d6c126f996ed61e254",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e6612636b6ac6f6aee7cb8d6c126f996ed61e254 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14294) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] dannycranmer commented on a change in pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
dannycranmer commented on a change in pull request #15085:
URL: https://github.com/apache/flink/pull/15085#discussion_r589279908



##########
File path: flink-end-to-end-tests/flink-streaming-kinesis-test/src/main/java/org/apache/flink/streaming/kinesis/test/KinesisTableApiITCase.java
##########
@@ -0,0 +1,159 @@
+/*
+ * 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.kinesis.test;
+
+import org.apache.flink.api.common.time.Deadline;
+import org.apache.flink.streaming.connectors.kinesis.testutils.KinesisPubsubClient;
+import org.apache.flink.streaming.kinesis.test.containers.KinesaliteContainer;
+import org.apache.flink.streaming.kinesis.test.model.Order;
+import org.apache.flink.tests.util.TestUtils;
+import org.apache.flink.tests.util.categories.TravisGroup1;
+import org.apache.flink.tests.util.flink.FlinkContainer;
+import org.apache.flink.tests.util.flink.SQLJobSubmission;
+
+import org.apache.flink.shaded.guava18.com.google.common.collect.ImmutableList;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.Timeout;
+import org.testcontainers.containers.Network;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Duration;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.streaming.connectors.kinesis.config.AWSConfigConstants.AWS_ENDPOINT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/** End-to-end test for Kinesis Table API using Kinesalite. */
+@Category(value = {TravisGroup1.class})

Review comment:
       @rmetzger / @zentol can you please advise on which `TravisGroup` annotation I should apply?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] dzikosc commented on a change in pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
dzikosc commented on a change in pull request #15085:
URL: https://github.com/apache/flink/pull/15085#discussion_r589344794



##########
File path: flink-end-to-end-tests/flink-streaming-kinesis-test/src/main/java/org/apache/flink/streaming/kinesis/test/KinesisTableApiITCase.java
##########
@@ -0,0 +1,159 @@
+/*
+ * 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.kinesis.test;
+
+import org.apache.flink.api.common.time.Deadline;
+import org.apache.flink.streaming.connectors.kinesis.testutils.KinesisPubsubClient;
+import org.apache.flink.streaming.kinesis.test.containers.KinesaliteContainer;
+import org.apache.flink.streaming.kinesis.test.model.Order;
+import org.apache.flink.tests.util.TestUtils;
+import org.apache.flink.tests.util.categories.TravisGroup1;
+import org.apache.flink.tests.util.flink.FlinkContainer;
+import org.apache.flink.tests.util.flink.SQLJobSubmission;
+
+import org.apache.flink.shaded.guava18.com.google.common.collect.ImmutableList;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.Timeout;
+import org.testcontainers.containers.Network;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Duration;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.streaming.connectors.kinesis.config.AWSConfigConstants.AWS_ENDPOINT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/** End-to-end test for Kinesis Table API using Kinesalite. */
+@Category(value = {TravisGroup1.class})
+public class KinesisTableApiITCase {
+    private static final String ORDERS_STREAM = "orders";
+    private static final String LARGE_ORDERS_STREAM = "large_orders";
+
+    private final Path sqlConnectorKinesisJar = TestUtils.getResource(".*kinesis.jar");
+    private final Network network = Network.newNetwork();
+
+    @ClassRule public static final Timeout TIMEOUT = new Timeout(10, TimeUnit.MINUTES);
+
+    @Rule
+    public final KinesaliteContainer kinesalite = new KinesaliteContainer().withNetwork(network);
+
+    @Rule
+    public final FlinkContainer flink =
+            FlinkContainer.builder()
+                    .build()
+                    .withEnv("AWS_ACCESS_KEY_ID", "fakeid")
+                    .withEnv("AWS_SECRET_KEY", "fakekey")
+                    .withEnv("AWS_CBOR_DISABLE", "1")
+                    .withEnv(
+                            "FLINK_ENV_JAVA_OPTS",
+                            "-Dorg.apache.flink.kinesis.shaded.com.amazonaws.sdk.disableCertChecking")
+                    .withNetwork(network)
+                    .dependsOn(kinesalite);
+
+    @BeforeClass
+    public static void setUp() {
+        // Required for Kinesalite.
+        // Including shaded and non-shaded conf to support test running from Maven and IntelliJ
+        System.setProperty("com.amazonaws.sdk.disableCertChecking", "1");
+        System.setProperty("com.amazonaws.sdk.disableCbor", "1");
+        System.setProperty(
+                "org.apache.flink.kinesis.shaded.com.amazonaws.sdk.disableCertChecking", "1");
+        System.setProperty("org.apache.flink.kinesis.shaded.com.amazonaws.sdk.disableCbor", "1");
+    }
+
+    @Test(timeout = 120_000)
+    public void testTableApiSourceAndSink() throws Exception {
+        Properties properties = new Properties();
+        properties.setProperty(AWS_ENDPOINT, kinesalite.getEndpointUrl());
+
+        List<Order> smallOrders = ImmutableList.of(new Order("A", 5), new Order("B", 10));
+
+        // Large orders have a quantity > 10

Review comment:
       I think for the reader of the test the non-local context is most relevant, e.g.:
   ```
   // filter-large-orders.sql is supposed to preserve orders with quantity > 10
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] rmetzger commented on a change in pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
rmetzger commented on a change in pull request #15085:
URL: https://github.com/apache/flink/pull/15085#discussion_r589312538



##########
File path: flink-end-to-end-tests/flink-streaming-kinesis-test/src/main/java/org/apache/flink/streaming/kinesis/test/KinesisTableApiITCase.java
##########
@@ -0,0 +1,159 @@
+/*
+ * 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.kinesis.test;
+
+import org.apache.flink.api.common.time.Deadline;
+import org.apache.flink.streaming.connectors.kinesis.testutils.KinesisPubsubClient;
+import org.apache.flink.streaming.kinesis.test.containers.KinesaliteContainer;
+import org.apache.flink.streaming.kinesis.test.model.Order;
+import org.apache.flink.tests.util.TestUtils;
+import org.apache.flink.tests.util.categories.TravisGroup1;
+import org.apache.flink.tests.util.flink.FlinkContainer;
+import org.apache.flink.tests.util.flink.SQLJobSubmission;
+
+import org.apache.flink.shaded.guava18.com.google.common.collect.ImmutableList;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.Timeout;
+import org.testcontainers.containers.Network;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Duration;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.streaming.connectors.kinesis.config.AWSConfigConstants.AWS_ENDPOINT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/** End-to-end test for Kinesis Table API using Kinesalite. */
+@Category(value = {TravisGroup1.class})

Review comment:
       Afaik any group should be fine, because we are not using this group mechanism anymore




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] dzikosc commented on a change in pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
dzikosc commented on a change in pull request #15085:
URL: https://github.com/apache/flink/pull/15085#discussion_r589343608



##########
File path: flink-end-to-end-tests/flink-streaming-kinesis-test/src/main/java/org/apache/flink/streaming/kinesis/test/KinesisTableApiITCase.java
##########
@@ -0,0 +1,159 @@
+/*
+ * 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.kinesis.test;
+
+import org.apache.flink.api.common.time.Deadline;
+import org.apache.flink.streaming.connectors.kinesis.testutils.KinesisPubsubClient;
+import org.apache.flink.streaming.kinesis.test.containers.KinesaliteContainer;
+import org.apache.flink.streaming.kinesis.test.model.Order;
+import org.apache.flink.tests.util.TestUtils;
+import org.apache.flink.tests.util.categories.TravisGroup1;
+import org.apache.flink.tests.util.flink.FlinkContainer;
+import org.apache.flink.tests.util.flink.SQLJobSubmission;
+
+import org.apache.flink.shaded.guava18.com.google.common.collect.ImmutableList;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.Timeout;
+import org.testcontainers.containers.Network;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Duration;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.streaming.connectors.kinesis.config.AWSConfigConstants.AWS_ENDPOINT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/** End-to-end test for Kinesis Table API using Kinesalite. */
+@Category(value = {TravisGroup1.class})
+public class KinesisTableApiITCase {
+    private static final String ORDERS_STREAM = "orders";
+    private static final String LARGE_ORDERS_STREAM = "large_orders";
+
+    private final Path sqlConnectorKinesisJar = TestUtils.getResource(".*kinesis.jar");
+    private final Network network = Network.newNetwork();
+
+    @ClassRule public static final Timeout TIMEOUT = new Timeout(10, TimeUnit.MINUTES);
+
+    @Rule
+    public final KinesaliteContainer kinesalite = new KinesaliteContainer().withNetwork(network);
+
+    @Rule
+    public final FlinkContainer flink =
+            FlinkContainer.builder()
+                    .build()
+                    .withEnv("AWS_ACCESS_KEY_ID", "fakeid")
+                    .withEnv("AWS_SECRET_KEY", "fakekey")
+                    .withEnv("AWS_CBOR_DISABLE", "1")
+                    .withEnv(
+                            "FLINK_ENV_JAVA_OPTS",
+                            "-Dorg.apache.flink.kinesis.shaded.com.amazonaws.sdk.disableCertChecking")
+                    .withNetwork(network)
+                    .dependsOn(kinesalite);
+
+    @BeforeClass
+    public static void setUp() {
+        // Required for Kinesalite.
+        // Including shaded and non-shaded conf to support test running from Maven and IntelliJ
+        System.setProperty("com.amazonaws.sdk.disableCertChecking", "1");
+        System.setProperty("com.amazonaws.sdk.disableCbor", "1");
+        System.setProperty(
+                "org.apache.flink.kinesis.shaded.com.amazonaws.sdk.disableCertChecking", "1");
+        System.setProperty("org.apache.flink.kinesis.shaded.com.amazonaws.sdk.disableCbor", "1");
+    }
+
+    @Test(timeout = 120_000)
+    public void testTableApiSourceAndSink() throws Exception {

Review comment:
       Just a general question on the local standards for tests structure... As it stands, the test mixes, technical setup, business narrative and obscures a little the intent of what is actually being tested (line 111). 
   
   What are the Flink standards in that area? 




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #15085:
URL: https://github.com/apache/flink/pull/15085#issuecomment-790506028


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15085:
URL: https://github.com/apache/flink/pull/15085#issuecomment-790506028


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14113",
       "triggerID" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e6612636b6ac6f6aee7cb8d6c126f996ed61e254",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "e6612636b6ac6f6aee7cb8d6c126f996ed61e254",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14113) 
   * e6612636b6ac6f6aee7cb8d6c126f996ed61e254 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15085:
URL: https://github.com/apache/flink/pull/15085#issuecomment-790506028


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14113",
       "triggerID" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e6612636b6ac6f6aee7cb8d6c126f996ed61e254",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14294",
       "triggerID" : "e6612636b6ac6f6aee7cb8d6c126f996ed61e254",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14113) 
   * e6612636b6ac6f6aee7cb8d6c126f996ed61e254 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14294) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15085:
URL: https://github.com/apache/flink/pull/15085#issuecomment-790506028


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14113",
       "triggerID" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e6612636b6ac6f6aee7cb8d6c126f996ed61e254",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14294",
       "triggerID" : "e6612636b6ac6f6aee7cb8d6c126f996ed61e254",
       "triggerType" : "PUSH"
     }, {
       "hash" : "899b0734e44859288a8df75228c1659f78076bd8",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "899b0734e44859288a8df75228c1659f78076bd8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e6612636b6ac6f6aee7cb8d6c126f996ed61e254 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14294) 
   * 899b0734e44859288a8df75228c1659f78076bd8 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15085:
URL: https://github.com/apache/flink/pull/15085#issuecomment-790506028


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14113",
       "triggerID" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14113) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #15085:
URL: https://github.com/apache/flink/pull/15085#issuecomment-790492194


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b (Thu Mar 04 10:01:51 UTC 2021)
   
   **Warnings:**
    * **1 pom.xml files were touched**: Check for build and licensing issues.
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15085:
URL: https://github.com/apache/flink/pull/15085#issuecomment-790506028


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14113",
       "triggerID" : "b0f71fb3c4ad47c2ef85f44e66086ccfd2bab72b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e6612636b6ac6f6aee7cb8d6c126f996ed61e254",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14294",
       "triggerID" : "e6612636b6ac6f6aee7cb8d6c126f996ed61e254",
       "triggerType" : "PUSH"
     }, {
       "hash" : "899b0734e44859288a8df75228c1659f78076bd8",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14505",
       "triggerID" : "899b0734e44859288a8df75228c1659f78076bd8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e6612636b6ac6f6aee7cb8d6c126f996ed61e254 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14294) 
   * 899b0734e44859288a8df75228c1659f78076bd8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14505) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] dannycranmer merged pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
dannycranmer merged pull request #15085:
URL: https://github.com/apache/flink/pull/15085


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] dannycranmer commented on a change in pull request #15085: [FLINK-20042][kinesis] Adding Kinesis Table API e2e test using the Java framework

Posted by GitBox <gi...@apache.org>.
dannycranmer commented on a change in pull request #15085:
URL: https://github.com/apache/flink/pull/15085#discussion_r592714433



##########
File path: flink-end-to-end-tests/flink-streaming-kinesis-test/src/main/java/org/apache/flink/streaming/kinesis/test/KinesisTableApiITCase.java
##########
@@ -0,0 +1,159 @@
+/*
+ * 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.kinesis.test;
+
+import org.apache.flink.api.common.time.Deadline;
+import org.apache.flink.streaming.connectors.kinesis.testutils.KinesisPubsubClient;
+import org.apache.flink.streaming.kinesis.test.containers.KinesaliteContainer;
+import org.apache.flink.streaming.kinesis.test.model.Order;
+import org.apache.flink.tests.util.TestUtils;
+import org.apache.flink.tests.util.categories.TravisGroup1;
+import org.apache.flink.tests.util.flink.FlinkContainer;
+import org.apache.flink.tests.util.flink.SQLJobSubmission;
+
+import org.apache.flink.shaded.guava18.com.google.common.collect.ImmutableList;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.Timeout;
+import org.testcontainers.containers.Network;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Duration;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+import static org.apache.flink.streaming.connectors.kinesis.config.AWSConfigConstants.AWS_ENDPOINT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/** End-to-end test for Kinesis Table API using Kinesalite. */
+@Category(value = {TravisGroup1.class})
+public class KinesisTableApiITCase {
+    private static final String ORDERS_STREAM = "orders";
+    private static final String LARGE_ORDERS_STREAM = "large_orders";
+
+    private final Path sqlConnectorKinesisJar = TestUtils.getResource(".*kinesis.jar");
+    private final Network network = Network.newNetwork();
+
+    @ClassRule public static final Timeout TIMEOUT = new Timeout(10, TimeUnit.MINUTES);
+
+    @Rule
+    public final KinesaliteContainer kinesalite = new KinesaliteContainer().withNetwork(network);
+
+    @Rule
+    public final FlinkContainer flink =
+            FlinkContainer.builder()
+                    .build()
+                    .withEnv("AWS_ACCESS_KEY_ID", "fakeid")
+                    .withEnv("AWS_SECRET_KEY", "fakekey")
+                    .withEnv("AWS_CBOR_DISABLE", "1")
+                    .withEnv(
+                            "FLINK_ENV_JAVA_OPTS",
+                            "-Dorg.apache.flink.kinesis.shaded.com.amazonaws.sdk.disableCertChecking")
+                    .withNetwork(network)
+                    .dependsOn(kinesalite);
+
+    @BeforeClass
+    public static void setUp() {
+        // Required for Kinesalite.
+        // Including shaded and non-shaded conf to support test running from Maven and IntelliJ
+        System.setProperty("com.amazonaws.sdk.disableCertChecking", "1");
+        System.setProperty("com.amazonaws.sdk.disableCbor", "1");
+        System.setProperty(
+                "org.apache.flink.kinesis.shaded.com.amazonaws.sdk.disableCertChecking", "1");
+        System.setProperty("org.apache.flink.kinesis.shaded.com.amazonaws.sdk.disableCbor", "1");
+    }
+
+    @Test(timeout = 120_000)
+    public void testTableApiSourceAndSink() throws Exception {

Review comment:
       This test is copied and similar to the kafka one. I have pulled the client and stream setup into the `@Before` method to reduce the complexity of the `@Test`




----------------------------------------------------------------
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:
users@infra.apache.org