Copilot commented on code in PR #19252:
URL: https://github.com/apache/pinot/pull/19252#discussion_r3799481422
##########
pinot-controller/src/test/java/org/apache/pinot/controller/helix/SegmentStatusCheckerTest.java:
##########
@@ -866,6 +1098,8 @@ public void noSegmentZKMetadataTest() {
PinotHelixResourceManager resourceManager =
mock(PinotHelixResourceManager.class);
when(resourceManager.getAllTables()).thenReturn(List.of(OFFLINE_TABLE_NAME));
when(resourceManager.getTableIdealState(OFFLINE_TABLE_NAME)).thenReturn(idealState);
+ // The segment is in the ideal state but has no ZK metadata at all
+ mockSegmentsZKMetadata(resourceManager, OFFLINE_TABLE_NAME, Map.of());
Review Comment:
`updateSegmentMetrics` now returns before refreshing the health gauges when
every metadata entry is null, but this test still expects freshly written
all-green values below. Because `_controllerMetrics` is intentionally shared
across tests, those assertions now depend on values left by another test and
fail when this test runs in isolation. Seed and assert preserved sentinel
values, or consolidate this case with
`tableWithoutAnyReadableSegmentZKMetadataKeepsItsGauges`.
--
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]