Copilot commented on code in PR #37409: URL: https://github.com/apache/shardingsphere/pull/37409#discussion_r2625321366
########## test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/type/TcFirebirdDatabaseType.java: ########## @@ -0,0 +1,46 @@ +/* + * 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. + */ + +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.Optional; + +/** + * Database type of Firebird in testcontainers. + */ +public final class TcFirebirdDatabaseType implements TestcontainersDatabaseType { + + @Override + public Collection<String> getJdbcUrlPrefixes() { + return Arrays.asList("jdbc:tc:firebird:", "jdbc:tc:firebirdsql"); Review Comment: The second JDBC URL prefix "jdbc:tc:firebirdsql" is missing a trailing colon. All other prefixes in this collection and other similar classes end with a colon. This should be "jdbc:tc:firebirdsql:" to match the pattern. ########## 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: Review Comment: Missing blank line before 'rules:' section. For consistency with other database configuration files (e.g., clickhouse.yaml, postgresql.yaml), there should be a blank line between the last datasource definition and the 'rules:' section. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
