morningman opened a new pull request, #67543:
URL: https://github.com/apache/doris/pull/67543

   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #67396, #67529, #66729
   
   Problem Summary:
   
   **master is red on `fe-core` checkstyle.** #67396 removed JUnit 4 from the fe
   reactor and added a `banJUnit4` checkstyle rule so it could not come back.
   #67529 added `StreamingInsertJobStatusTransitionTest`, written with JUnit 4.
   The two crossed in flight: the migration could not cover a file that did not
   exist when it was written, and the new test was branched before the rule
   existed.
   
   `mvn checkstyle:check -pl fe-core` on master reports exactly two errors, both
   in this file, on its two JUnit 4 imports:
   
   ```
   src/test/java/org/apache/doris/job/extensions/insert/streaming/
       StreamingInsertJobStatusTransitionTest.java:23  error
       StreamingInsertJobStatusTransitionTest.java:24  error
   ```
   
   The fix is mechanical: two imports and six `Assert.` call sites. All six are
   one- or two-argument forms carrying no assertion message, so none is affected
   by the JUnit 4 -> 5 message reordering (JUnit 4 puts an assertion message
   **first**, JUnit 5 puts it **last**). Every argument stays exactly where it 
is.
   
   **Why this is worth its own PR rather than waiting.** `junit-vintage-engine` 
is
   what runs a JUnit 4 test in this reactor, and it is on its way out - #66729
   removes it once the `be-java-extensions` modules are migrated, which is the 
last
   thing keeping it alive. Without that engine, the jupiter engine does not 
fail on
   a JUnit 4 test, it **ignores** it: these three cases would stop running and
   nothing would say so. That silent-skip is exactly the failure #67396 made the
   gate a checkstyle rule for, and exactly why it held the engine back until the
   tree was clean. Landing this first keeps that ordering safe.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test
       - [x] Unit Test
       - [ ] Regression test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
   
   `mvn checkstyle:check -pl fe-core` goes from 2 violations to 0.
   
   `mvn test -pl fe-core -am -Dtest=StreamingInsertJobStatusTransitionTest`:
   BUILD SUCCESS, `Tests run: 3, Failures: 0, Errors: 0, Skipped: 0` - matching 
the
   three `@Test` methods in the class, so the class is really running and not 
being
   skipped.
   
   - Behavior changed:
       - [x] No.
   
   - Does this need documentation?
       - [x] No.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01A58s52vfYcoTyJiMVv3cdA
   


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