You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2026/02/21 13:44:58 UTC
(shardingsphere) branch master updated: Add more test cases on H2ConnectionPropertiesParserTest (#38123)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new c4d08b498d2 Add more test cases on H2ConnectionPropertiesParserTest (#38123)
c4d08b498d2 is described below
commit c4d08b498d29793120b655901206a456dd57674e
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sat Feb 21 21:44:53 2026 +0800
Add more test cases on H2ConnectionPropertiesParserTest (#38123)
---
.../connector/h2/jdbcurl/H2ConnectionPropertiesParserTest.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/database/connector/dialect/h2/src/test/java/org/apache/shardingsphere/database/connector/h2/jdbcurl/H2ConnectionPropertiesParserTest.java b/database/connector/dialect/h2/src/test/java/org/apache/shardingsphere/database/connector/h2/jdbcurl/H2ConnectionPropertiesParserTest.java
index 0290e10b0c9..c20cefafe64 100644
--- a/database/connector/dialect/h2/src/test/java/org/apache/shardingsphere/database/connector/h2/jdbcurl/H2ConnectionPropertiesParserTest.java
+++ b/database/connector/dialect/h2/src/test/java/org/apache/shardingsphere/database/connector/h2/jdbcurl/H2ConnectionPropertiesParserTest.java
@@ -20,19 +20,24 @@ package org.apache.shardingsphere.database.connector.h2.jdbcurl;
import org.apache.shardingsphere.database.connector.core.exception.UnrecognizedDatabaseURLException;
import org.apache.shardingsphere.database.connector.core.jdbcurl.parser.ConnectionProperties;
import org.apache.shardingsphere.database.connector.core.jdbcurl.parser.ConnectionPropertiesParser;
+import org.apache.shardingsphere.database.connector.core.spi.DatabaseTypedSPILoader;
+import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
+import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import java.util.stream.Stream;
-import static org.hamcrest.Matchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
import static org.junit.jupiter.api.Assertions.assertThrows;
class H2ConnectionPropertiesParserTest {
- private final ConnectionPropertiesParser parser = new H2ConnectionPropertiesParser();
+ private final DatabaseType databaseType = TypedSPILoader.getService(DatabaseType.class, "H2");
+
+ private final ConnectionPropertiesParser parser = DatabaseTypedSPILoader.getService(ConnectionPropertiesParser.class, databaseType);
@ParameterizedTest(name = "{0}")
@MethodSource("provideArguments")