nevzheng opened a new pull request, #13837:
URL: https://github.com/apache/gravitino/pull/13837
### What changes were proposed in this pull request?
`:core:test` no longer runs its own copy of the core suite. It runs no tests
itself and depends on the lanes instead:
- `coreUnitTest` and `coreH2Test` always;
- `coreMySQLTest` and `corePostgreSQLTest` as well when Docker tests are on
(`-PskipDockerTests=false`);
- no lane under `-PskipTests`, which runs integration tests only (core has
none).
`--tests` patterns given to `:core:test`, as IDEs pass them, are forwarded
to the lanes, and a lane that matches nothing does not fail the run. The
deprecation warning is removed, and `docs/how-to-test.md` now describes
`:core:test` as running the lanes.
This PR is the last commit on the stack; the earlier commits belong to
#13517, #13518, #13530 and #13553.
### Why are the changes needed?
After #13517 split core into lanes, `:core:test` still ran the whole suite
as a fifth, separate task. That left five ways to run the same tests, and the
default `./gradlew test` / `build` path did not match what CI runs.
Related to: #13516
### Does this PR introduce _any_ user-facing change?
No production changes. Test-only: `./gradlew :core:test`, `test` and `build`
now run the core lanes and write results under each lane's report directory. CI
is unchanged: `build (17)` still passes `-x :core:test`, and each lane runs in
its own `core-test` job.
Reviewer focus: forwarding `--tests` reads Gradle's internal
`DefaultTestFilter`, because `TestFilter` has no public getter for command-line
patterns.
### How was this patch tested?
Locally (macOS, JDK 17, Gradle 8.2):
- `--dry-run` task graphs:
- `:core:test -PskipDockerTests=true` runs `coreUnitTest` and `coreH2Test`;
- `-PskipDockerTests=false` adds `coreMySQLTest` and `corePostgreSQLTest`;
- `-PskipTests` runs no lane;
- `:core:build -x :core:test` runs no lane.
- `./gradlew :core:test -PskipWeb=true -PskipDockerTests=true`:
`coreUnitTest` 2,231 tests and `coreH2Test` 588 tests, 0 failures. `:core:test`
itself ran no tests and printed no warning.
- `./gradlew :core:test --tests '...service.TestJobMetaService' --tests
'...relational.TestCoreLaneMembership'`: the H2 lane ran only
`TestJobMetaService` and the unit lane ran only `TestCoreLaneMembership`.
- `./gradlew :core:spotlessCheck`
Not run through the alias: the MySQL and PostgreSQL lanes. They passed on
#13553's head with the same lane tasks.
**Stack:** #13517 → #13518 → #13530 → #13553 → **this PR**
--
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]