You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "nzw921rx (via GitHub)" <gi...@apache.org> on 2026/08/20 05:08:07 UTC

[I] [Improve][E2E] Use DependencyJar for MySQL driver in error handling tests [seatunnel]

nzw921rx opened a new issue, #11899:
URL: https://github.com/apache/seatunnel/issues/11899

   ## Description
   
   `TransformErrorToMysqlIT` and `SinkErrorToMysqlIT` currently download MySQL Connector/J from Maven Central by running `curl` inside the SeaTunnel test container:
   
   ```java
   container -> {
       Container.ExecResult extraCommands =
               container.execInContainer(
                       "bash",
                       "-c",
                       "mkdir -p /tmp/seatunnel/plugins/Jdbc/lib"
                               + " && cd /tmp/seatunnel/plugins/Jdbc/lib"
                               + " && (test -s mysql-connector-j-8.0.32.jar"
                               + " || curl -fsSLO --retry 5 --retry-delay 2 "
                               + DRIVER_JAR
                               + ")");
       Assertions.assertEquals(0, extraCommands.getExitCode(), extraCommands.getStderr());
   };
   ```
   
   This duplicates dependency setup logic and makes the E2E tests depend on network access from inside the running container. SeaTunnel E2E already provides `DependencyJar` to locate a test dependency on the host classpath and copy its JAR into the test container.
   
   The affected module already declares `com.mysql:mysql-connector-j:8.0.32` with test scope, so no new Maven dependency is required.
   
   ## Affected files
   
   - `seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/TransformErrorToMysqlIT.java`
   - `seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/SinkErrorToMysqlIT.java`
   
   ## Suggested change
   
   Replace the container-side `curl` logic in both tests with the standard helper, following existing E2E examples:
   
   ```java
   import org.apache.seatunnel.e2e.common.util.DependencyJar;
   
   import com.mysql.cj.jdbc.Driver;
   
   @TestContainerExtension
   private final ContainerExtendedFactory extendedFactory =
           container ->
                   DependencyJar.of(Driver.class)
                           .copyTo(container, "/tmp/seatunnel/plugins/Jdbc/lib");
   ```
   
   Also remove the now-unused `DRIVER_JAR` constant and imports related only to the shell download implementation.
   
   ## Acceptance criteria
   
   - Both tests use `DependencyJar` to copy MySQL Connector/J into `/tmp/seatunnel/plugins/Jdbc/lib`.
   - Neither test downloads the driver with `curl` or otherwise requires container-side Maven Central access.
   - No new Maven dependency or dependency version change is introduced.
   - Existing test behavior and coverage remain unchanged.
   - Spotless and the focused `connector-seatunnel-e2e-base` validation pass.
   
   Contributors are welcome to comment on this issue before starting so it can be assigned and duplicate work can be avoided.
   


-- 
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: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature][E2E] Use DependencyJar for MySQL driver in error handling tests [seatunnel]

Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx commented on issue #11899:
URL: https://github.com/apache/seatunnel/issues/11899#issuecomment-5354725678

   > Hi @nzw921rx! Could i work on this?
   
   https://github.com/apache/seatunnel/issues/11007
   
   Is there anything in this issue you’d like to claim?🥳


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature][E2E] Use DependencyJar for MySQL driver in error handling tests [seatunnel]

Posted by "KaustAbhinand (via GitHub)" <gi...@apache.org>.
KaustAbhinand commented on issue #11899:
URL: https://github.com/apache/seatunnel/issues/11899#issuecomment-5354663519

   Hi @nzw921rx! Could i work on this?


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature][E2E] Use DependencyJar for MySQL driver in error handling tests [seatunnel]

Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx commented on issue #11899:
URL: https://github.com/apache/seatunnel/issues/11899#issuecomment-5354694601

   > Hi @nzw921rx! Could i work on this?
   
   Thank you, someone has already submitted a PR to claim it.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature][E2E] Use DependencyJar for MySQL driver in error handling tests [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo closed issue #11899: [Feature][E2E] Use DependencyJar for MySQL driver in error handling tests
URL: https://github.com/apache/seatunnel/issues/11899


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org