You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2024/09/06 05:12:20 UTC

(incubator-streampark) branch dev updated: fix UT (#4037)

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

benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


The following commit(s) were added to refs/heads/dev by this push:
     new e81678d20 fix UT (#4037)
e81678d20 is described below

commit e81678d20fa956e6a17d2e83276c1964c1a7bdc4
Author: Xiangpeng Hu <65...@users.noreply.github.com>
AuthorDate: Fri Sep 6 13:12:15 2024 +0800

    fix UT (#4037)
---
 .../plugin/registry/jdbc/LockUtilsTest.java        |  8 ++++++++
 .../src/test/resources/application.yaml            | 24 ++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/streampark-console/streampark-console-registry/streampark-registry-plugins/streampark-registry-jdbc/src/test/java/org/apache/streampark/plugin/registry/jdbc/LockUtilsTest.java b/streampark-console/streampark-console-registry/streampark-registry-plugins/streampark-registry-jdbc/src/test/java/org/apache/streampark/plugin/registry/jdbc/LockUtilsTest.java
index 6e107c7ff..2b4317847 100644
--- a/streampark-console/streampark-console-registry/streampark-registry-plugins/streampark-registry-jdbc/src/test/java/org/apache/streampark/plugin/registry/jdbc/LockUtilsTest.java
+++ b/streampark-console/streampark-console-registry/streampark-registry-plugins/streampark-registry-jdbc/src/test/java/org/apache/streampark/plugin/registry/jdbc/LockUtilsTest.java
@@ -17,10 +17,18 @@
 
 package org.apache.streampark.plugin.registry.jdbc;
 
+import org.apache.streampark.common.utils.NetworkUtils;
+
 import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.TestPropertySource;
 
 import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
 
+@SpringBootTest
+@ContextConfiguration(classes = {NetworkUtils.class})
+@TestPropertySource(locations = "classpath:application.yaml")
 class LockUtilsTest {
 
     @Test
diff --git a/streampark-console/streampark-console-registry/streampark-registry-plugins/streampark-registry-jdbc/src/test/resources/application.yaml b/streampark-console/streampark-console-registry/streampark-registry-plugins/streampark-registry-jdbc/src/test/resources/application.yaml
new file mode 100644
index 000000000..7f828bf58
--- /dev/null
+++ b/streampark-console/streampark-console-registry/streampark-registry-plugins/streampark-registry-jdbc/src/test/resources/application.yaml
@@ -0,0 +1,24 @@
+#
+# 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.
+#
+
+network:
+  # network interface preferred like eth0, default: empty
+  preferred-interface: ""
+  # network interface restricted like docker0, default: empty
+  restrict-interface: docker0
+  # network IP gets priority, default inner outer
+  priority-strategy: default