This is an automated email from the ASF dual-hosted git repository.
Jackie-Jiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 40b3c1b7de0 Spy a plain RetentionManager in the table-level hybrid
retention test so subclass suites can reuse it (#20236)
40b3c1b7de0 is described below
commit 40b3c1b7de02d3a681a3d8d29553f87c93876ac0
Author: Xiang Fu <[email protected]>
AuthorDate: Fri Nov 13 13:17:48 2026 -0800
Spy a plain RetentionManager in the table-level hybrid retention test so
subclass suites can reuse it (#20236)
---
.../controller/helix/core/retention/RetentionManagerTest.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/retention/RetentionManagerTest.java
b/pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/retention/RetentionManagerTest.java
index 95e5d84a45e..431776dae97 100644
---
a/pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/retention/RetentionManagerTest.java
+++
b/pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/retention/RetentionManagerTest.java
@@ -603,8 +603,11 @@ public class RetentionManagerTest {
ControllerConf conf = new ControllerConf();
conf.setProperty(ControllerConf.ENABLE_HYBRID_TABLE_RETENTION_STRATEGY,
clusterLevel);
- RetentionManager retentionManager =
spy(createSizeRetentionManager(realtimeTableConfig, List.of(), resourceManager,
- mock(ControllerMetrics.class), conf, mock(BrokerServiceHelper.class)));
+ // Spy a plain RetentionManager rather than going through
createRetentionManager(...), so the package-private
+ // methods stubbed below stay interceptable when a subclass suite
overrides that factory
+ stubSizeRetentionResourceManager(realtimeTableConfig, List.of(),
resourceManager, conf);
+ RetentionManager retentionManager = spy(new
RetentionManager(resourceManager, mock(LeadControllerManager.class),
+ conf, mock(ControllerMetrics.class), mock(BrokerServiceHelper.class)));
// Only the retention strategy selection is under test, so stub out both
branches
doNothing().when(retentionManager).manageRetentionForHybridTable(any(),
any());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]