FrankChen021 commented on PR #19911:
URL: https://github.com/apache/druid/pull/19911#issuecomment-5210694938

   ## Expanded JUnit 5 migration scope and evidence
   
   This update preserves the existing server migration in #19911 and adds the 
dependency-coupled `services` and `embedded-tests` test sources/POMs. The final 
PR boundary is `server/**`, `services/**`, and `embedded-tests/**` only. The 
embedded changes from commits `adac0cc117` and `1869c51f68` were reused by 
filtering to `embedded-tests/**`; no `multi-stage-query/**` files were included.
   
   Shared server test fixtures consumed by these modules, including 
`TestDerbyConnector` and `LatchableEmitter`, no longer expose JUnit 4 or 
Hamcrest types in their test-jar APIs. No JUnit 4/Hamcrest compatibility 
dependencies were reintroduced. Direct legacy JUnit4, Vintage, 
migration-support, JUnitParams, system-rules, and Hamcrest dependencies were 
removed from the services/embedded POMs once their imports were gone.
   
   ### Scoped validation
   
   - `mvn -ntp -pl server,services,embedded-tests test-compile -DskipTests 
-Dweb.console.skip=true -T1C` — passed with checkstyle (0 violations), PMD, 
Enforcer, forbidden-API checks, and test compilation.
   - `mvn -ntp -pl server,services,embedded-tests spotbugs:check -DskipTests 
-Dweb.console.skip=true -T1C` — passed; server and services reported 0 
BugInstances/0 errors, and embedded-tests has no main classes for SpotBugs.
   - Java/POM audits — no legacy `org.junit` (outside `org.junit.jupiter`), 
`org.hamcrest`, JUnit4 rule, or obsolete direct dependency matches under the 
three scoped modules.
   - Services tests — 228 tests passed when the Docker-only 
`TestcontainerResourceTest` was excluded. The complete invocation had exactly 
one environment error: Testcontainers could not find a valid Docker environment.
   - Reactor smoke test using the current server test-jar, `CompactionTaskTest` 
— 8 tests passed; no Hamcrest linkage error.
   - The project JUnit5 usage audit reports zero JUnit4/Vintage hits for 
server, services, and embedded-tests. Its remaining hits are in unrelated 
modules such as SQL, processing, indexing-service, MSQ, and extensions.
   
   ### Known environment/baseline blockers
   
   - The full server run completed 3,906 tests with 1 failure and 26 skips. The 
failure is `SegmentLoadingTest.testMaxSegmentsInNodeLoadingQueue` at line 300 
(`CANCELLED_ACTIONS`: expected 2, observed 0), reproduced in isolation with all 
four Surefire retries. Its migration diff is limited to JUnit 
imports/assertions and `@BeforeEach`; no migration-caused fixture change was 
identified, so it was not modified.
   - A broader `services -am` test compile reaches the un-migrated SQL tests 
and fails at `BrokerSegmentMetadataCacheConcurrencyTest.java:107` and 
`BrokerSegmentMetadataCacheTest.java:803` because `temporaryFolder` is now a 
`java.io.File` without `newFolder()`. This is outside this PR's scope.
   - A direct embedded-only full-test invocation is not reliable evidence in 
this worktree because it resolves the stale installed server test-jar; it 
reported `NoClassDefFoundError: org/hamcrest/Matchers` from that artifact along 
with Docker errors. The reactor compile/smoke result above uses the current 
server fixture. Docker-backed embedded tests remain unavailable here.
   
   This PR is part of [issue 
#13948](https://github.com/apache/druid/issues/13948) and is related to 
[#19875](https://github.com/apache/druid/pull/19875), 
[#19908](https://github.com/apache/druid/pull/19908), 
[#19909](https://github.com/apache/druid/pull/19909), and 
[#19910](https://github.com/apache/druid/pull/19910).
   
   Published commit: `5e4efcfc5b`.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to