Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into feature-122
Browse files Browse the repository at this point in the history
  • Loading branch information
liugddx committed Jan 29, 2025
2 parents c491638 + 36b3dd2 commit ac85490
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ public void close() {
if (cursor != null) {
cursor.close();
}
if (clientProvider != null) {
clientProvider.close();
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.seatunnel.e2e.common.junit.DisabledOnContainer;
import org.apache.seatunnel.e2e.common.junit.TestContainerExtension;

import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.TestTemplate;
Expand Down Expand Up @@ -129,6 +130,13 @@ public void init() {
initializeJdbcTable();
}

@AfterAll
public void close() {
if (MYSQL_CONTAINER != null) {
MYSQL_CONTAINER.close();
}
}

@TestTemplate
public void testDorisCDCSink(TestContainer container) throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package org.apache.seatunnel.e2e.connector.doris;

import org.apache.seatunnel.shade.com.google.common.collect.Lists;

import org.apache.seatunnel.connectors.seatunnel.cdc.mysql.testutils.MySqlContainer;
import org.apache.seatunnel.connectors.seatunnel.cdc.mysql.testutils.MySqlVersion;
import org.apache.seatunnel.connectors.seatunnel.cdc.mysql.testutils.UniqueDatabase;
Expand Down Expand Up @@ -80,7 +78,9 @@ public class DorisSchemaChangeIT extends AbstractDorisIT {
private static final String PROJECTION_QUERY =
"select id,name,description,weight,add_column1,add_column2,add_column3 from %s.%s order by id;";
private static final MySqlContainer MYSQL_CONTAINER = createMySqlContainer(MySqlVersion.V8_0);
private final UniqueDatabase shopDatabase = new UniqueDatabase(MYSQL_CONTAINER, DATABASE);
private final UniqueDatabase shopDatabase =
new UniqueDatabase(
MYSQL_CONTAINER, DATABASE, MYSQL_USER_NAME, MYSQL_USER_PASSWORD, DATABASE);

@TestContainerExtension
private final ContainerExtendedFactory extendedFactory =
Expand All @@ -107,7 +107,6 @@ private static MySqlContainer createMySqlContainer(MySqlVersion version) {
.withLogConsumer(
new Slf4jLogConsumer(
DockerLoggerFactory.getLogger("mysql-docker-image")));
mySqlContainer.setPortBindings(Lists.newArrayList(String.format("%s:%s", 3306, 3306)));
return mySqlContainer;
}

Expand Down

0 comments on commit ac85490

Please sign in to comment.