You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tz...@apache.org on 2020/02/29 03:51:13 UTC

[flink-statefun] 04/05: [FLINK-16274] [e2e] Use new dynamic configuration methods in SanityVerificationITCase

This is an automated email from the ASF dual-hosted git repository.

tzulitai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-statefun.git

commit dbb7165185b93a58079c244a631112aebea29634
Author: Tzu-Li (Gordon) Tai <tz...@apache.org>
AuthorDate: Tue Feb 25 16:30:12 2020 +0800

    [FLINK-16274] [e2e] Use new dynamic configuration methods in SanityVerificationITCase
---
 .../statefun/e2e/sanity/SanityVerificationE2E.java | 12 +++--------
 .../src/test/resources/flink-conf.yaml             | 25 ----------------------
 2 files changed, 3 insertions(+), 34 deletions(-)

diff --git a/statefun-e2e-tests/statefun-sanity-e2e/src/test/java/org/apache/flink/statefun/e2e/sanity/SanityVerificationE2E.java b/statefun-e2e-tests/statefun-sanity-e2e/src/test/java/org/apache/flink/statefun/e2e/sanity/SanityVerificationE2E.java
index 87890ae..33ac127 100644
--- a/statefun-e2e-tests/statefun-sanity-e2e/src/test/java/org/apache/flink/statefun/e2e/sanity/SanityVerificationE2E.java
+++ b/statefun-e2e-tests/statefun-sanity-e2e/src/test/java/org/apache/flink/statefun/e2e/sanity/SanityVerificationE2E.java
@@ -23,7 +23,6 @@ import static org.hamcrest.MatcherAssert.assertThat;
 
 import java.util.Collections;
 import java.util.Properties;
-import org.apache.flink.configuration.Configuration;
 import org.apache.flink.statefun.e2e.common.StatefulFunctionsAppContainers;
 import org.apache.flink.statefun.e2e.common.kafka.KafkaIOVerifier;
 import org.apache.flink.statefun.e2e.common.kafka.KafkaProtobufSerializer;
@@ -57,12 +56,6 @@ public class SanityVerificationE2E {
 
   private static final String CONFLUENT_PLATFORM_VERSION = "5.0.3";
 
-  private static final Configuration flinkConf = new Configuration();
-
-  static {
-    flinkConf.setString("statefun.module.global-config.kafka-broker", Constants.KAFKA_BROKER_HOST);
-  }
-
   @Rule
   public KafkaContainer kafka =
       new KafkaContainer(CONFLUENT_PLATFORM_VERSION)
@@ -70,9 +63,10 @@ public class SanityVerificationE2E {
 
   @Rule
   public StatefulFunctionsAppContainers verificationApp =
-      new StatefulFunctionsAppContainers("sanity-verification", 2, flinkConf)
+      new StatefulFunctionsAppContainers("sanity-verification", 2)
           .dependsOn(kafka)
-          .exposeMasterLogs(LOG);
+          .exposeMasterLogs(LOG)
+          .withModuleGlobalConfiguration("kafka-broker", Constants.KAFKA_BROKER_HOST);
 
   @Test(timeout = 60_000L)
   public void run() throws Exception {
diff --git a/statefun-e2e-tests/statefun-sanity-e2e/src/test/resources/flink-conf.yaml b/statefun-e2e-tests/statefun-sanity-e2e/src/test/resources/flink-conf.yaml
deleted file mode 100644
index a3887ac..0000000
--- a/statefun-e2e-tests/statefun-sanity-e2e/src/test/resources/flink-conf.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
-# 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.
-# This file is the base for the Apache Flink configuration
-
-# this allows us to test local as well as remote function messaging
-parallelism.default: 2
-
-classloader.parent-first-patterns.additional: org.apache.flink.statefun;org.apache.kafka;com.google.protobuf
-state.backend: rocksdb
-state.backend.rocksdb.timer-service.factory: ROCKSDB
-state.checkpoints.dir: file:///checkpoint-dir
-state.backend.incremental: true
-taskmanager.memory.process.size: 4g