Hisoka-X commented on code in PR #8132: URL: https://github.com/apache/seatunnel/pull/8132#discussion_r1857858092
########## seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-part-1/src/test/java/org/apache/seatunnel/connectors/seatunnel/jdbc/JdbcMariaDBIT.java: ########## @@ -0,0 +1,167 @@ +/* + * 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.seatunnel.connectors.seatunnel.jdbc; + +import org.apache.seatunnel.shade.com.google.common.collect.Lists; + +import org.apache.seatunnel.api.table.type.SeaTunnelRow; +import org.apache.seatunnel.e2e.common.container.TestContainer; + +import org.apache.commons.lang3.tuple.Pair; + +import org.testcontainers.containers.Container; +import org.testcontainers.containers.GenericContainer; +import org.testcontainers.containers.MariaDBContainer; +import org.testcontainers.containers.output.Slf4jLogConsumer; +import org.testcontainers.containers.wait.strategy.Wait; +import org.testcontainers.utility.DockerImageName; +import org.testcontainers.utility.DockerLoggerFactory; + +import java.sql.Date; +import java.sql.Time; +import java.sql.Timestamp; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** This class is used to test the Generic dialect with MariaDB. */ +public class JdbcMariaDBIT extends AbstractJdbcIT { + private static final String MARIADB_CONTAINER_HOST = "mariadb-e2e"; + private static final int MARIADB_PORT = 3306; + private static final String MARIADB_IMAGE = + "mariadb:11.6.2-ubi9"; // Use the appropriate version + private static final String MARIADB_DRIVER = "org.mariadb.jdbc.Driver"; + private static final String MARIADB_URL = "jdbc:mariadb://" + HOST + ":%s/%s"; + private static final String MARIADB_DATABASE_NAME = "seatunnel"; + private static final String MARIADB_USER = "mariadb_user"; // Replace with your username + private static final String MARIADB_PASSWORD = "mariadb_password"; // Replace with your password + + private static final String MARIADB_SOURCE = "source"; + private static final String MARIADB_SINK = "sink"; + private static final String CATALOG_DATABASE = "catalog_database"; + + private static final List<String> CONFIG_FILE = Review Comment: To save ci time and remove duplicated code. -- 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]
