This is an automated email from the ASF dual-hosted git repository.
zongwen pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new 3144f4203 [test][improve] add customizeClientConfig test case (#3789)
3144f4203 is described below
commit 3144f4203db896a50582251f27c5cf7b62e96741
Author: Guangdong Liu <[email protected]>
AuthorDate: Thu Dec 22 23:11:58 2022 +0800
[test][improve] add customizeClientConfig test case (#3789)
---
.../config/YamlSeaTunnelConfigParserTest.java | 12 +++++++
.../src/test/resources/custmoize-client.yaml | 37 ++++++++++++++++++++++
2 files changed, 49 insertions(+)
diff --git
a/seatunnel-engine/seatunnel-engine-common/src/test/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelConfigParserTest.java
b/seatunnel-engine/seatunnel-engine-common/src/test/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelConfigParserTest.java
index bf17925d9..7d6faf9bb 100644
---
a/seatunnel-engine/seatunnel-engine-common/src/test/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelConfigParserTest.java
+++
b/seatunnel-engine/seatunnel-engine-common/src/test/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelConfigParserTest.java
@@ -17,9 +17,13 @@
package org.apache.seatunnel.engine.common.config;
+import com.hazelcast.client.config.ClientConfig;
+import com.hazelcast.client.config.YamlClientConfigBuilder;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
+import java.io.IOException;
+
public class YamlSeaTunnelConfigParserTest {
@Test
@@ -57,4 +61,12 @@ public class YamlSeaTunnelConfigParserTest {
}
+ @Test
+ public void testCustomizeClientConfig() throws IOException {
+ YamlClientConfigBuilder yamlClientConfigBuilder = new
YamlClientConfigBuilder("custmoize-client.yaml");
+ ClientConfig clientConfig = yamlClientConfigBuilder.build();
+
+ Assertions.assertEquals("custmoize", clientConfig.getClusterName());
+
+ }
}
diff --git
a/seatunnel-engine/seatunnel-engine-common/src/test/resources/custmoize-client.yaml
b/seatunnel-engine/seatunnel-engine-common/src/test/resources/custmoize-client.yaml
new file mode 100644
index 000000000..e44281d9a
--- /dev/null
+++
b/seatunnel-engine/seatunnel-engine-common/src/test/resources/custmoize-client.yaml
@@ -0,0 +1,37 @@
+#
+# 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.
+#
+
+hazelcast-client:
+ cluster-name: custmoize
+
+ network:
+ cluster-members:
+ - host:5801
+ - host:5802
+ - host:5803
+ - host:5804
+ - host:5805
+ - host:5806
+ - host:5807
+ - host:5808
+ - host:5809
+ - host:5810
+ - host:5811
+ - host:5812
+ - host:5813
+ - host:5814
+ - host:5815