Skip to content

Commit

Permalink
[test][improve] add customizeClientConfig test case (apache#3789)
Browse files Browse the repository at this point in the history
  • Loading branch information
liugddx authored Dec 22, 2022
1 parent 696656f commit 3144f42
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -57,4 +61,12 @@ public void testSeaTunnelConfig() {

}

@Test
public void testCustomizeClientConfig() throws IOException {
YamlClientConfigBuilder yamlClientConfigBuilder = new YamlClientConfigBuilder("custmoize-client.yaml");
ClientConfig clientConfig = yamlClientConfigBuilder.build();

Assertions.assertEquals("custmoize", clientConfig.getClusterName());

}
}
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3144f42

Please sign in to comment.