github-actions[bot] commented on code in PR #64849:
URL: https://github.com/apache/doris/pull/64849#discussion_r3674354983


##########
fe/fe-core/src/test/java/org/apache/doris/nereids/mv/PreMaterializedViewRewriterTest.java:
##########
@@ -59,7 +59,7 @@ public class PreMaterializedViewRewriterTest extends 
SqlTestBase {
 
     @Test
     public void testShouldNotRecordTmpPlanWhenNoMv() {
-        
connectContext.getSessionVariable().setDisableNereidsRules("PRUNE_EMPTY_PARTITION");
+        
connectContext.getSessionVariable().setDisableNereidsRules("PRUNE_EMPTY_PARTITION,
 ELIMINATE_GROUP_BY_KEY");

Review Comment:
   **[P2] Restore the shared SessionVariable after this test**
   
   This now leaks `ELIMINATE_GROUP_BY_KEY` into other tests in the class. 
`testShouldNotRecordTmpPlanWhenNoMv` replaces the shared per-class 
`SessionVariable` with a spy whose `getDisableNereidsRules()` is permanently 
stubbed to this captured BitSet; the inherited `runBeforeEach()` only changes 
the spy's backing string, so it cannot clear the stubbed bit for later methods. 
Depending on JUnit's method order, those tests can silently run with the 
production rule disabled and miss regressions. Please scope this spy to the 
test and restore the original `SessionVariable` in `finally` (or reset/replace 
it after each test).



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