You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by bowenli86 <gi...@git.apache.org> on 2017/12/07 07:25:52 UTC
[GitHub] flink pull request #5130: [FLINK-8216] Unify test utils in flink-connector-k...
GitHub user bowenli86 opened a pull request:
https://github.com/apache/flink/pull/5130
[FLINK-8216] Unify test utils in flink-connector-kinesis
## What is the purpose of the change
currently there are a few ways to get a `Properties` object with required fields (aws access key, aws secret key, aws region) for `KinesisConsumer` and `KinesisProducer` in unit tests. We should unify them and provide a single util to get that `Properties` object
## Brief change log
Unified all similar test utils to `TestUtils.getPropertiesWithRequiredFields()`
## Verifying this change
This change is already covered by existing tests in `flink-connector-kinesis`
## Does this pull request potentially affect one of the following parts:
none
## Documentation
none
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/bowenli86/flink FLINK-8216
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5130.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5130
----
commit 33d435a504a354d51e93c6678d4c94e6eef58a68
Author: Bowen Li <bo...@gmail.com>
Date: 2017-12-07T07:22:50Z
[FLINK-8216] Unify test utils in flink-connector-kinesis
----
---
[GitHub] flink pull request #5130: [FLINK-8216] Unify test utils in flink-connector-k...
Posted by tzulitai <gi...@git.apache.org>.
Github user tzulitai commented on a diff in the pull request:
https://github.com/apache/flink/pull/5130#discussion_r155451196
--- Diff: flink-connectors/flink-connector-kinesis/src/test/java/org/apache/flink/streaming/connectors/kinesis/testutils/TestUtils.java ---
@@ -0,0 +1,39 @@
+/*
+ * 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.connectors.kinesis.testutils;
+
+import org.apache.flink.streaming.connectors.kinesis.config.AWSConfigConstants;
+
+import java.util.Properties;
+
+/**
+ * General test utils.
+ */
+public class TestUtils {
+ /**
+ * Get properties with Kinesis-required fields.
+ */
+ public static Properties getPropertiesWithRequiredFields() {
--- End diff --
I prefer the name `getStandardProperties` over this one. That makes it a bit more coherent with the Kafka test code.
---
[GitHub] flink pull request #5130: [FLINK-8216] [Kinesis connector] Unify test utils ...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/flink/pull/5130
---
[GitHub] flink issue #5130: [FLINK-8216] [Kinesis connector] Unify test utils in flin...
Posted by tzulitai <gi...@git.apache.org>.
Github user tzulitai commented on the issue:
https://github.com/apache/flink/pull/5130
Merging this ..
---