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 5985f0f424b Refactor Firebird's nativeTest (#37409)
5985f0f424b is described below

commit 5985f0f424b893f38b9453f687d983dd1ef6d7f5
Author: Ling Hengqian <[email protected]>
AuthorDate: Wed Dec 17 12:05:47 2025 +0800

    Refactor Firebird's nativeTest (#37409)
---
 .../optional-plugins/clickhouse/_index.cn.md       |  2 +-
 .../optional-plugins/clickhouse/_index.en.md       |  2 +-
 .../reachability-metadata.json                     | 24 ++++++
 pom.xml                                            |  1 +
 test/native/pom.xml                                |  6 ++
 .../TcFirebirdConnectionPropertiesParser.java}     | 28 +++----
 .../{ => type}/TcClickhouseDatabaseType.java       |  2 +-
 .../TcFirebirdDatabaseType.java}                   | 14 ++--
 .../{ => type}/TcPostgreSQLDatabaseType.java       |  2 +-
 .../{ => type}/TcSQLServerDatabaseType.java        |  2 +-
 .../{ => type}/TestcontainersDatabaseType.java     |  2 +-
 .../natived/jdbc/databases/ClickHouseTest.java     |  2 -
 .../test/natived/jdbc/databases/FirebirdTest.java  | 96 ++--------------------
 ...core.jdbcurl.parser.ConnectionPropertiesParser} |  4 +-
 ...phere.database.connector.core.type.DatabaseType |  7 +-
 .../yaml/jdbc/databases/clickhouse.yaml            |  6 +-
 .../test-native/yaml/jdbc/databases/firebird.yaml  | 19 ++---
 17 files changed, 76 insertions(+), 143 deletions(-)

diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md
index 5bd5262cdb8..8728ff87cdd 100644
--- 
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md
@@ -43,7 +43,7 @@ ShardingSphere 对 ClickHouse JDBC Driver 的支持位于可选模块中。
 ```yaml
 services:
   clickhouse-server:
-    image: clickhouse/clickhouse-server:25.6.5.41
+    image: clickhouse/clickhouse-server:25.9.6.117
     environment:
       CLICKHOUSE_SKIP_USER_SETUP: "1"
     ports:
diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md
index 2ca667c6ec0..71999eadf74 100644
--- 
a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md
@@ -43,7 +43,7 @@ Write a Docker Compose file to start ClickHouse.
 ```yaml
 services:
   clickhouse-server:
-    image: clickhouse/clickhouse-server:25.6.5.41
+    image: clickhouse/clickhouse-server:25.9.6.117
     environment:
       CLICKHOUSE_SKIP_USER_SETUP: "1"
     ports:
diff --git 
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reachability-metadata.json
 
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reachability-metadata.json
index 527f97c5363..01ad295c03e 100644
--- 
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reachability-metadata.json
+++ 
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reachability-metadata.json
@@ -11690,6 +11690,18 @@
       },
       "glob": "current-git-commit.properties"
     },
+    {
+      "condition": {
+        "typeReached": 
"org.apache.shardingsphere.driver.jdbc.core.statement.StatementManager"
+      },
+      "glob": "isc_error_msg.properties"
+    },
+    {
+      "condition": {
+        "typeReached": 
"org.apache.shardingsphere.driver.jdbc.core.statement.StatementManager"
+      },
+      "glob": "isc_error_sqlstates.properties"
+    },
     {
       "condition": {
         "typeReached": 
"org.apache.shardingsphere.transaction.xa.atomikos.manager.AtomikosTransactionManagerProvider"
@@ -11702,6 +11714,18 @@
       },
       "glob": "lib/sqlparser/druid.jar"
     },
+    {
+      "condition": {
+        "typeReached": 
"org.apache.shardingsphere.driver.jdbc.core.statement.StatementManager"
+      },
+      "glob": "org/firebirdsql/jaybird_error_msg.properties"
+    },
+    {
+      "condition": {
+        "typeReached": 
"org.apache.shardingsphere.driver.jdbc.core.statement.StatementManager"
+      },
+      "glob": "org/firebirdsql/jaybird_error_sqlstates.properties"
+    },
     {
       "condition": {
         "typeReached": 
"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"
diff --git a/pom.xml b/pom.xml
index 9b69d2603e8..65f1a3486c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -136,6 +136,7 @@
         <hamcrest.version>3.0</hamcrest.version>
         <mockito.version>4.11.0</mockito.version>
         <awaitility.version>4.3.0</awaitility.version>
+        
<firebird-testcontainers-java.version>1.6.0</firebird-testcontainers-java.version>
         <commons-csv.version>1.9.0</commons-csv.version>
         
         <graal-sdk.version>24.1.2</graal-sdk.version>
diff --git a/test/native/pom.xml b/test/native/pom.xml
index 8061aab15f8..4867e65049d 100644
--- a/test/native/pom.xml
+++ b/test/native/pom.xml
@@ -136,6 +136,12 @@
             <artifactId>clickhouse</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.firebirdsql</groupId>
+            <artifactId>firebird-testcontainers-java</artifactId>
+            <version>${firebird-testcontainers-java.version}</version>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>org.apache.curator</groupId>
             <artifactId>curator-test</artifactId>
diff --git 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcClickhouseDatabaseType.java
 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/jdbcurl/TcFirebirdConnectionPropertiesParser.java
similarity index 55%
copy from 
test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcClickhouseDatabaseType.java
copy to 
test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/jdbcurl/TcFirebirdConnectionPropertiesParser.java
index 192a768c4cc..00927a2864b 100644
--- 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcClickhouseDatabaseType.java
+++ 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/jdbcurl/TcFirebirdConnectionPropertiesParser.java
@@ -15,32 +15,26 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers;
+package 
org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.jdbcurl;
 
-import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
-import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Optional;
+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.jdbcurl.parser.StandardJdbcUrlParser;
 
 /**
- * Database type of Clickhouse in testcontainers.
+ * Connection properties parser of Firebird.
  */
-public final class TcClickhouseDatabaseType implements 
TestcontainersDatabaseType {
+public final class TcFirebirdConnectionPropertiesParser implements 
ConnectionPropertiesParser {
     
-    @Override
-    public Collection<String> getJdbcUrlPrefixes() {
-        return Collections.singleton("jdbc:tc:clickhouse:");
-    }
+    private static final int DEFAULT_PORT = 3050;
     
     @Override
-    public Optional<DatabaseType> getTrunkDatabaseType() {
-        return Optional.of(TypedSPILoader.getService(DatabaseType.class, 
"ClickHouse"));
+    public ConnectionProperties parse(final String url, final String username, 
final String catalog) {
+        return new StandardJdbcUrlParser().parse(url, DEFAULT_PORT);
     }
     
     @Override
-    public String getType() {
-        return "TC-Clickhouse";
+    public String getDatabaseType() {
+        return "TC-Firebird";
     }
 }
diff --git 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcClickhouseDatabaseType.java
 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TcClickhouseDatabaseType.java
similarity index 98%
copy from 
test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcClickhouseDatabaseType.java
copy to 
test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TcClickhouseDatabaseType.java
index 192a768c4cc..20d490f25d9 100644
--- 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcClickhouseDatabaseType.java
+++ 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TcClickhouseDatabaseType.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers;
+package 
org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.type;
 
 import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
 import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
diff --git 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcClickhouseDatabaseType.java
 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TcFirebirdDatabaseType.java
similarity index 81%
rename from 
test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcClickhouseDatabaseType.java
rename to 
test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TcFirebirdDatabaseType.java
index 192a768c4cc..6f2c223c9d9 100644
--- 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcClickhouseDatabaseType.java
+++ 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TcFirebirdDatabaseType.java
@@ -15,32 +15,32 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers;
+package 
org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.type;
 
 import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
 import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
 
+import java.util.Arrays;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.Optional;
 
 /**
- * Database type of Clickhouse in testcontainers.
+ * Database type of Firebird in testcontainers.
  */
-public final class TcClickhouseDatabaseType implements 
TestcontainersDatabaseType {
+public final class TcFirebirdDatabaseType implements 
TestcontainersDatabaseType {
     
     @Override
     public Collection<String> getJdbcUrlPrefixes() {
-        return Collections.singleton("jdbc:tc:clickhouse:");
+        return Arrays.asList("jdbc:tc:firebird:", "jdbc:tc:firebirdsql:");
     }
     
     @Override
     public Optional<DatabaseType> getTrunkDatabaseType() {
-        return Optional.of(TypedSPILoader.getService(DatabaseType.class, 
"ClickHouse"));
+        return Optional.of(TypedSPILoader.getService(DatabaseType.class, 
"Firebird"));
     }
     
     @Override
     public String getType() {
-        return "TC-Clickhouse";
+        return "TC-Firebird";
     }
 }
diff --git 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcPostgreSQLDatabaseType.java
 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TcPostgreSQLDatabaseType.java
similarity index 98%
rename from 
test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcPostgreSQLDatabaseType.java
rename to 
test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TcPostgreSQLDatabaseType.java
index c985e66f402..b69adbbe43d 100644
--- 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcPostgreSQLDatabaseType.java
+++ 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TcPostgreSQLDatabaseType.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers;
+package 
org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.type;
 
 import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
 import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
diff --git 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcSQLServerDatabaseType.java
 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TcSQLServerDatabaseType.java
similarity index 98%
rename from 
test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcSQLServerDatabaseType.java
rename to 
test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TcSQLServerDatabaseType.java
index 197e373b0d6..39f4daf7c15 100644
--- 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcSQLServerDatabaseType.java
+++ 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TcSQLServerDatabaseType.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers;
+package 
org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.type;
 
 import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
 import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
diff --git 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TestcontainersDatabaseType.java
 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TestcontainersDatabaseType.java
similarity index 98%
rename from 
test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TestcontainersDatabaseType.java
rename to 
test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TestcontainersDatabaseType.java
index 185c99fa87e..e38d918a2bf 100644
--- 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TestcontainersDatabaseType.java
+++ 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TestcontainersDatabaseType.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package 
org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers;
+package 
org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.type;
 
 import org.apache.shardingsphere.database.connector.core.type.DatabaseType;
 
diff --git 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java
 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java
index 49761529cdf..5eb966f0324 100644
--- 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java
+++ 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java
@@ -25,7 +25,6 @@ import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.EnabledInNativeImage;
 import org.testcontainers.jdbc.ContainerDatabaseDriver;
-import org.testcontainers.junit.jupiter.Testcontainers;
 
 import javax.sql.DataSource;
 import java.sql.SQLException;
@@ -33,7 +32,6 @@ import java.sql.SQLException;
 import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
 
 @EnabledInNativeImage
-@Testcontainers
 class ClickHouseTest {
     
     private DataSource logicDataSource;
diff --git 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/FirebirdTest.java
 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/FirebirdTest.java
index 4b25bbde04c..27e307868a0 100644
--- 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/FirebirdTest.java
+++ 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/FirebirdTest.java
@@ -21,71 +21,33 @@ import com.zaxxer.hikari.HikariConfig;
 import com.zaxxer.hikari.HikariDataSource;
 import org.apache.shardingsphere.test.natived.commons.TestShardingService;
 import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
-import org.awaitility.Awaitility;
-import org.firebirdsql.management.FBManager;
-import org.firebirdsql.management.PageSizeConstants;
 import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.EnabledInNativeImage;
-import org.testcontainers.containers.GenericContainer;
-import org.testcontainers.junit.jupiter.Container;
-import org.testcontainers.junit.jupiter.Testcontainers;
+import org.testcontainers.jdbc.ContainerDatabaseDriver;
 
 import javax.sql.DataSource;
-import java.sql.Connection;
-import java.sql.DriverManager;
 import java.sql.SQLException;
-import java.time.Duration;
-import java.util.Properties;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.nullValue;
 
 @EnabledInNativeImage
-@Testcontainers
 class FirebirdTest {
     
-    private final String systemPropKeyPrefix = 
"fixture.test-native.yaml.database.firebird.";
-    
-    private final String password = "masterkey";
-    
-    @SuppressWarnings("resource")
-    @Container
-    private final GenericContainer<?> container = new 
GenericContainer<>("firebirdsql/firebird:5.0.3")
-            .withEnv("FIREBIRD_ROOT_PASSWORD", password)
-            .withEnv("FIREBIRD_USER", "alice")
-            .withEnv("FIREBIRD_PASSWORD", password)
-            .withEnv("FIREBIRD_DATABASE", "mirror.fdb")
-            .withEnv("FIREBIRD_DATABASE_DEFAULT_CHARSET", "UTF8")
-            .withExposedPorts(3050);
-    
     private DataSource logicDataSource;
     
-    private String jdbcUrlPrefix;
-    
     private TestShardingService testShardingService;
     
-    @BeforeEach
-    void beforeEach() {
-        assertThat(System.getProperty(systemPropKeyPrefix + "ds0.jdbc-url"), 
is(nullValue()));
-        assertThat(System.getProperty(systemPropKeyPrefix + "ds1.jdbc-url"), 
is(nullValue()));
-        assertThat(System.getProperty(systemPropKeyPrefix + "ds2.jdbc-url"), 
is(nullValue()));
-    }
-    
     @AfterEach
     void afterEach() throws SQLException {
         ResourceUtils.closeJdbcDataSource(logicDataSource);
-        System.clearProperty(systemPropKeyPrefix + "ds0.jdbc-url");
-        System.clearProperty(systemPropKeyPrefix + "ds1.jdbc-url");
-        System.clearProperty(systemPropKeyPrefix + "ds2.jdbc-url");
+        ContainerDatabaseDriver.killContainers();
     }
     
     @Test
-    void assertShardingInLocalTransactions() throws Exception {
-        jdbcUrlPrefix = "jdbc:firebird://localhost:" + 
container.getMappedPort(3050) + "//var/lib/firebird/data/";
-        logicDataSource = createDataSource();
+    void assertShardingInLocalTransactions() throws SQLException {
+        HikariConfig config = new HikariConfig();
+        
config.setDriverClassName("org.apache.shardingsphere.driver.ShardingSphereDriver");
+        
config.setJdbcUrl("jdbc:shardingsphere:classpath:test-native/yaml/jdbc/databases/firebird.yaml");
+        logicDataSource = new HikariDataSource(config);
         testShardingService = new TestShardingService(logicDataSource);
         initEnvironment();
         testShardingService.processSuccess();
@@ -103,48 +65,4 @@ class FirebirdTest {
         testShardingService.getOrderItemRepository().createTableInFirebird();
         testShardingService.getAddressRepository().createTableInFirebird();
     }
-    
-    private Connection openConnection() throws SQLException {
-        Properties props = new Properties();
-        props.setProperty("user", "alice");
-        props.setProperty("password", password);
-        return DriverManager.getConnection(jdbcUrlPrefix + "mirror.fdb", 
props);
-    }
-    
-    /**
-     * Due to <a 
href="https://github.com/FirebirdSQL/jaybird/issues/629";>FirebirdSQL/jaybird#629</a>,
-     * the SQL statement `Create Database` cannot be executed on the Firebird 
JDBC driver.
-     * Unit testing requires the use of {@link 
org.firebirdsql.management.FBManager}.
-     *
-     * @return Data Source
-     * @throws Exception Exception
-     * @see org.firebirdsql.management.FBManager
-     */
-    @SuppressWarnings({"SqlDialectInspection", "SqlNoDataSourceInspection"})
-    private DataSource createDataSource() throws Exception {
-        
Awaitility.await().atMost(Duration.ofMinutes(1L)).ignoreExceptions().until(() 
-> {
-            openConnection().close();
-            return true;
-        });
-        try (FBManager fbManager = new FBManager()) {
-            fbManager.setServer("localhost");
-            fbManager.setUserName("alice");
-            fbManager.setPassword(password);
-            fbManager.setFileName("/var/lib/firebird/data/mirror.fdb");
-            fbManager.setPageSize(PageSizeConstants.SIZE_16K);
-            fbManager.setDefaultCharacterSet("UTF8");
-            fbManager.setPort(container.getMappedPort(3050));
-            fbManager.start();
-            fbManager.createDatabase("/var/lib/firebird/data/demo_ds_0.fdb", 
"alice", password);
-            fbManager.createDatabase("/var/lib/firebird/data/demo_ds_1.fdb", 
"alice", password);
-            fbManager.createDatabase("/var/lib/firebird/data/demo_ds_2.fdb", 
"alice", password);
-        }
-        HikariConfig config = new HikariConfig();
-        
config.setDriverClassName("org.apache.shardingsphere.driver.ShardingSphereDriver");
-        
config.setJdbcUrl("jdbc:shardingsphere:classpath:test-native/yaml/jdbc/databases/firebird.yaml?placeholder-type=system_props");
-        System.setProperty(systemPropKeyPrefix + "ds0.jdbc-url", jdbcUrlPrefix 
+ "demo_ds_0.fdb");
-        System.setProperty(systemPropKeyPrefix + "ds1.jdbc-url", jdbcUrlPrefix 
+ "demo_ds_1.fdb");
-        System.setProperty(systemPropKeyPrefix + "ds2.jdbc-url", jdbcUrlPrefix 
+ "demo_ds_2.fdb");
-        return new HikariDataSource(config);
-    }
 }
diff --git 
a/test/native/src/test/resources/META-INF/services/org.apache.shardingsphere.database.connector.core.type.DatabaseType
 
b/test/native/src/test/resources/META-INF/services/org.apache.shardingsphere.database.connector.core.jdbcurl.parser.ConnectionPropertiesParser
similarity index 78%
copy from 
test/native/src/test/resources/META-INF/services/org.apache.shardingsphere.database.connector.core.type.DatabaseType
copy to 
test/native/src/test/resources/META-INF/services/org.apache.shardingsphere.database.connector.core.jdbcurl.parser.ConnectionPropertiesParser
index 6c22de3937a..9f5bffe72d5 100644
--- 
a/test/native/src/test/resources/META-INF/services/org.apache.shardingsphere.database.connector.core.type.DatabaseType
+++ 
b/test/native/src/test/resources/META-INF/services/org.apache.shardingsphere.database.connector.core.jdbcurl.parser.ConnectionPropertiesParser
@@ -15,6 +15,4 @@
 # limitations under the License.
 #
 
-org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.TcPostgreSQLDatabaseType
-org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.TcSQLServerDatabaseType
-org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.TcClickhouseDatabaseType
+org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.jdbcurl.TcFirebirdConnectionPropertiesParser
diff --git 
a/test/native/src/test/resources/META-INF/services/org.apache.shardingsphere.database.connector.core.type.DatabaseType
 
b/test/native/src/test/resources/META-INF/services/org.apache.shardingsphere.database.connector.core.type.DatabaseType
index 6c22de3937a..2908b7054fc 100644
--- 
a/test/native/src/test/resources/META-INF/services/org.apache.shardingsphere.database.connector.core.type.DatabaseType
+++ 
b/test/native/src/test/resources/META-INF/services/org.apache.shardingsphere.database.connector.core.type.DatabaseType
@@ -15,6 +15,7 @@
 # limitations under the License.
 #
 
-org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.TcPostgreSQLDatabaseType
-org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.TcSQLServerDatabaseType
-org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.TcClickhouseDatabaseType
+org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.type.TcPostgreSQLDatabaseType
+org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.type.TcSQLServerDatabaseType
+org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.type.TcClickhouseDatabaseType
+org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.type.TcFirebirdDatabaseType
diff --git 
a/test/native/src/test/resources/test-native/yaml/jdbc/databases/clickhouse.yaml
 
b/test/native/src/test/resources/test-native/yaml/jdbc/databases/clickhouse.yaml
index 90bca7900e9..44127a21623 100644
--- 
a/test/native/src/test/resources/test-native/yaml/jdbc/databases/clickhouse.yaml
+++ 
b/test/native/src/test/resources/test-native/yaml/jdbc/databases/clickhouse.yaml
@@ -19,15 +19,15 @@ dataSources:
   ds_0:
     dataSourceClassName: com.zaxxer.hikari.HikariDataSource
     driverClassName: org.testcontainers.jdbc.ContainerDatabaseDriver
-    jdbcUrl: 
jdbc:tc:clickhouse:25.6.5.41:///demo_ds_0?TC_INITSCRIPT=test-native/sql/clickhouse-init.sql
+    jdbcUrl: 
jdbc:tc:clickhouse:25.9.6.117:///demo_ds_0?TC_INITSCRIPT=test-native/sql/clickhouse-init.sql
   ds_1:
     dataSourceClassName: com.zaxxer.hikari.HikariDataSource
     driverClassName: org.testcontainers.jdbc.ContainerDatabaseDriver
-    jdbcUrl: 
jdbc:tc:clickhouse:25.6.5.41:///demo_ds_1?TC_INITSCRIPT=test-native/sql/clickhouse-init.sql
+    jdbcUrl: 
jdbc:tc:clickhouse:25.9.6.117:///demo_ds_1?TC_INITSCRIPT=test-native/sql/clickhouse-init.sql
   ds_2:
     dataSourceClassName: com.zaxxer.hikari.HikariDataSource
     driverClassName: org.testcontainers.jdbc.ContainerDatabaseDriver
-    jdbcUrl: 
jdbc:tc:clickhouse:25.6.5.41:///demo_ds_2?TC_INITSCRIPT=test-native/sql/clickhouse-init.sql
+    jdbcUrl: 
jdbc:tc:clickhouse:25.9.6.117:///demo_ds_2?TC_INITSCRIPT=test-native/sql/clickhouse-init.sql
 
 rules:
   - !SHARDING
diff --git 
a/test/native/src/test/resources/test-native/yaml/jdbc/databases/firebird.yaml 
b/test/native/src/test/resources/test-native/yaml/jdbc/databases/firebird.yaml
index 9b4a9b636cd..f0cca245337 100644
--- 
a/test/native/src/test/resources/test-native/yaml/jdbc/databases/firebird.yaml
+++ 
b/test/native/src/test/resources/test-native/yaml/jdbc/databases/firebird.yaml
@@ -18,23 +18,16 @@
 dataSources:
   ds_0:
     dataSourceClassName: com.zaxxer.hikari.HikariDataSource
-    driverClassName: org.firebirdsql.jdbc.FBDriver
-    jdbcUrl: $${fixture.test-native.yaml.database.firebird.ds0.jdbc-url::}
-    username: alice
-    password: masterkey
+    driverClassName: org.testcontainers.jdbc.ContainerDatabaseDriver
+    jdbcUrl: jdbc:tc:firebird:5.0.3:///demo_ds_0
   ds_1:
     dataSourceClassName: com.zaxxer.hikari.HikariDataSource
-    driverClassName: org.firebirdsql.jdbc.FBDriver
-    jdbcUrl: $${fixture.test-native.yaml.database.firebird.ds1.jdbc-url::}
-    username: alice
-    password: masterkey
+    driverClassName: org.testcontainers.jdbc.ContainerDatabaseDriver
+    jdbcUrl: jdbc:tc:firebird:5.0.3:///demo_ds_1
   ds_2:
     dataSourceClassName: com.zaxxer.hikari.HikariDataSource
-    driverClassName: org.firebirdsql.jdbc.FBDriver
-    jdbcUrl: $${fixture.test-native.yaml.database.firebird.ds2.jdbc-url::}
-    username: alice
-    password: masterkey
-
+    driverClassName: org.testcontainers.jdbc.ContainerDatabaseDriver
+    jdbcUrl: jdbc:tc:firebird:5.0.3:///demo_ds_2
 rules:
 - !SHARDING
   tables:

Reply via email to