Jackie-Jiang opened a new pull request, #19678:
URL: https://github.com/apache/pinot/pull/19678

   ## Summary
   
   `BaseTableDataManagerTest` registers a `ServerMetrics` mock in 
`@BeforeClass`, and since #19468 two of its tests `verify(...)` gauge updates 
on it. `ServerMetrics.register` only swaps in against the NOOP default, so when 
another test class in the same JVM registered an instance first (any suite 
running with `reuseForks=true`, including downstream projects that extend this 
test-jar class), the mock never lands and the tests fail with 
`NotAMockException: Argument should be a mock, but is: class ServerMetrics`. 
OSS does not hit this only because `pinot-core` runs with `reuseForks=false`.
   
   The test now clears the registered instance before registering its mock and 
restores it in `@AfterClass`, so it verifies against its own mock regardless of 
what ran before it, and test classes that run afterwards keep the instance they 
registered.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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