|
19 | 19 |
|
20 | 20 | import org.apache.seatunnel.e2e.common.TestResource;
|
21 | 21 | import org.apache.seatunnel.e2e.common.TestSuiteBase;
|
| 22 | +import org.apache.seatunnel.e2e.common.container.ContainerExtendedFactory; |
| 23 | +import org.apache.seatunnel.e2e.common.container.EngineType; |
22 | 24 | import org.apache.seatunnel.e2e.common.container.TestContainer;
|
| 25 | +import org.apache.seatunnel.e2e.common.junit.DisabledOnContainer; |
| 26 | +import org.apache.seatunnel.e2e.common.junit.TestContainerExtension; |
23 | 27 |
|
24 | 28 | import org.junit.jupiter.api.AfterAll;
|
25 | 29 | import org.junit.jupiter.api.Assertions;
|
26 | 30 | import org.junit.jupiter.api.BeforeAll;
|
27 |
| -import org.junit.jupiter.api.Disabled; |
28 | 31 | import org.junit.jupiter.api.TestTemplate;
|
29 | 32 | import org.testcontainers.containers.Container;
|
30 | 33 | import org.testcontainers.containers.GenericContainer;
|
|
53 | 56 | import static org.awaitility.Awaitility.given;
|
54 | 57 |
|
55 | 58 | @Slf4j
|
56 |
| -@Disabled("There are still errors unfixed @Hisoka-X") |
57 | 59 | public class StarRocksCDCSinkIT extends TestSuiteBase implements TestResource {
|
58 | 60 | private static final String DOCKER_IMAGE = "d87904488/starrocks-starter:2.2.1";
|
59 | 61 | private static final String DRIVER_CLASS = "com.mysql.cj.jdbc.Driver";
|
@@ -87,6 +89,18 @@ public class StarRocksCDCSinkIT extends TestSuiteBase implements TestResource {
|
87 | 89 | private Connection jdbcConnection;
|
88 | 90 | private GenericContainer<?> starRocksServer;
|
89 | 91 |
|
| 92 | + @TestContainerExtension |
| 93 | + private final ContainerExtendedFactory extendedFactory = |
| 94 | + container -> { |
| 95 | + Container.ExecResult extraCommands = |
| 96 | + container.execInContainer( |
| 97 | + "bash", |
| 98 | + "-c", |
| 99 | + "mkdir -p /tmp/seatunnel/plugins/Jdbc/lib && cd /tmp/seatunnel/plugins/Jdbc/lib && curl -O " |
| 100 | + + SR_DRIVER_JAR); |
| 101 | + Assertions.assertEquals(0, extraCommands.getExitCode()); |
| 102 | + }; |
| 103 | + |
90 | 104 | @BeforeAll
|
91 | 105 | @Override
|
92 | 106 | public void startUp() {
|
@@ -119,6 +133,10 @@ public void tearDown() throws Exception {
|
119 | 133 | }
|
120 | 134 |
|
121 | 135 | @TestTemplate
|
| 136 | + @DisabledOnContainer( |
| 137 | + value = {}, |
| 138 | + type = {EngineType.SPARK}, |
| 139 | + disabledReason = "Currently Spark engine unsupported DELETE operation") |
122 | 140 | public void testStarRocksSink(TestContainer container) throws Exception {
|
123 | 141 | Container.ExecResult execResult =
|
124 | 142 | container.executeJob("/write-cdc-changelog-to-starrocks.conf");
|
|
0 commit comments