From 39c8eb5d8e2e096a666382ac7f2bf32d7f06f5aa Mon Sep 17 00:00:00 2001 From: zhangshenghang Date: Mon, 4 Nov 2024 21:37:10 +0800 Subject: [PATCH] fix some problem --- .../src/test/resources/jdbc_starrocks_dialect.conf | 1 - .../src/test/resources/jdbc_starrocks_source_to_sink.conf | 1 - .../engine/core/classloader/ClassLoaderServiceTest.java | 6 ++---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-part-2/src/test/resources/jdbc_starrocks_dialect.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-part-2/src/test/resources/jdbc_starrocks_dialect.conf index 69fe5538f58..2e07ab32516 100644 --- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-part-2/src/test/resources/jdbc_starrocks_dialect.conf +++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-part-2/src/test/resources/jdbc_starrocks_dialect.conf @@ -18,7 +18,6 @@ env { parallelism = 1 job.mode = "BATCH" - jars = "file:///tmp/jars/mysql-connector-java-8.0.16.jar" } source { diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-part-2/src/test/resources/jdbc_starrocks_source_to_sink.conf b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-part-2/src/test/resources/jdbc_starrocks_source_to_sink.conf index d9d4cf18112..6d5447ffb4c 100644 --- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-part-2/src/test/resources/jdbc_starrocks_source_to_sink.conf +++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-part-2/src/test/resources/jdbc_starrocks_source_to_sink.conf @@ -18,7 +18,6 @@ env { parallelism = 1 job.mode = "BATCH" - jars = "file:///tmp/jars/mysql-connector-java-8.0.16.jar" } source { diff --git a/seatunnel-engine/seatunnel-engine-core/src/test/java/org/apache/seatunnel/engine/core/classloader/ClassLoaderServiceTest.java b/seatunnel-engine/seatunnel-engine-core/src/test/java/org/apache/seatunnel/engine/core/classloader/ClassLoaderServiceTest.java index 37f3e736813..d98d8da2e5b 100644 --- a/seatunnel-engine/seatunnel-engine-core/src/test/java/org/apache/seatunnel/engine/core/classloader/ClassLoaderServiceTest.java +++ b/seatunnel-engine/seatunnel-engine-core/src/test/java/org/apache/seatunnel/engine/core/classloader/ClassLoaderServiceTest.java @@ -124,9 +124,7 @@ void testPreCheckJar() throws IOException { () -> { try { classLoaderService.getClassLoader( - 3L, - Lists.newArrayList(new URL("file:///fake.jar")), - mockNodeEngine); + 3L, Lists.newArrayList(new URL("file:/fake.jar")), mockNodeEngine); } catch (ClassLoaderException e) { Assertions.assertTrue( e.getMessage() @@ -138,7 +136,7 @@ void testPreCheckJar() throws IOException { // Creating a temporary jar file for testing File tempJar = File.createTempFile("console", ".jar"); - String tempJarPath = "file://" + tempJar.getPath(); + String tempJarPath = tempJar.toURI().toURL().toString(); // Test case to check successful class loader creation with existing jar file Assertions.assertDoesNotThrow(