shuke987 opened a new pull request, #65768: URL: https://github.com/apache/doris/pull/65768
### What problem does this PR solve? Issue Number: N/A Related PR: N/A Problem Summary: `PruneOlapScanTabletTest` extends `SqlTestBase`, which starts a live FE, but the test used method-parameter `@Mocked` objects for four core catalog types. JMockit therefore mocked every instance of those types in the test JVM, including live FE objects used by background threads. This made expectation recording/replay race with FE activity and caused intermittent default results or missing invocations before the tablet-pruning assertion. One example is the null table name failure in [FE UT build 998284](http://43.132.222.7:8111/buildConfiguration/Doris_Doris_FeUt/998284?buildTab=tests&expandedTest=build%3A%28id%3A998284%29%2Cid%3A2000005656). This change replaces the four type-wide mocks with instance-scoped `@Injectable` mocks. The expectations, pruning rule, and 19-tablet assertion are unchanged. ### Release note None ### Check List (For Author) - Test - [ ] Regression test - [x] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason Exact FE UT class passed in three independent runs (6/6 tests total): ```text mvn -pl fe-core -am test -Dcheckstyle.skip=true \ -DfailIfNoTests=false \ -Dtest=org.apache.doris.nereids.rules.rewrite.PruneOlapScanTabletTest ``` - Behavior changed: - [x] No. - [ ] Yes. - Does this need documentation? - [x] No. - [ ] Yes. ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label -- 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]
