goutamadwant opened a new pull request, #11626:
URL: https://github.com/apache/seatunnel/pull/11626
<!--
Thank you for contributing to SeaTunnel! Please make sure that your code
changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
## Contribution Checklist
- Make sure that the pull request corresponds to a [GITHUB
issue](https://github.com/apache/seatunnel/issues).
- Name the pull request in the form "[Feature] [component] Title of the
pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
- Minor fixes should be named following this pattern: `[hotfix] [docs] Fix
typo in README.md doc`.
-->
### Purpose of this pull request
This is the first opt-in slice of #10784.
- Add a JUnit root resource that keeps one reusable container instance per
container type and JVM.
- Serialize test-class access to a shared container and restart it after
startup or cleanup failures.
- Add class-level cleanup for the SeaTunnel container, including active-job
checks, mounted-volume cleanup, temporary config cleanup, and connector JAR
restoration.
- Opt `FakeIT` and `FakeSqlConfIT` into sharing only the SeaTunnel engine
container. Flink and Spark containers keep their existing lifecycle.
- Add focused lifecycle tests for reuse, class serialization, cleanup
failures, startup failures, and JVM shutdown.
Connector JARs remain loaded on demand by each test class. JARs added by
that class are removed during cleanup, so the next class starts from the same
connector baseline.
### Does this PR introduce _any_ user-facing change?
No. This only changes internal E2E test infrastructure.
### How was this patch tested?
Unit tests and formatting:
```shell
./mvnw -pl seatunnel-e2e/seatunnel-e2e-common spotless:apply test -DskipIT
```
Representative multi-engine E2E run:
```shell
TEST_IN_PR=true RUN_ALL_CONTAINER=false RUN_ZETA_CONTAINER=true \
./mvnw -pl seatunnel-e2e/seatunnel-connector-v2-e2e/connector-fake-e2e \
-Dapi.version=1.40 -DskipUT -DskipIT=false \
-Dit.test=FakeIT,FakeSqlConfIT verify
```
Both test classes passed on Flink 1.18, Flink 1.20, Spark 3.3, and SeaTunnel
Engine: 8 tests, 0 failures, 0 errors.
Using the same warmed local Docker environment and command:
- `dev` at `2b51d3614`: 12 min 29 sec
- this branch at `84be9f5e5`: 11 min 14 sec
- measured reduction: 75 sec, about 10 percent for this two-class slice
The branch run started one SeaTunnel Engine container and reused it across
both classes. The cleanup checks confirmed no active jobs and restored the
volume, temporary config, and connector JAR baselines between classes.
### Check list
* [x] No new Jar binary package is added, so no License Notice change is
required.
* [x] No documentation change is required because this only affects internal
E2E test infrastructure.
* [x] No incompatible user-facing change is introduced.
* [x] No connector packaging files are affected.
--
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]