snleee commented on a change in pull request #8071:
URL: https://github.com/apache/pinot/pull/8071#discussion_r793261182
##########
File path:
pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManagerTest.java
##########
@@ -816,6 +819,48 @@ public void testSegmentReplacementForRefresh()
Assert.assertEquals(new
HashSet<>(ControllerTestUtils.getHelixResourceManager()
.getSegmentsFor(OFFLINE_SEGMENTS_REPLACE_TEST_REFRESH_TABLE_NAME,
true)),
new HashSet<>(Arrays.asList("s9", "s10", "s11")));
+
+ // Call revert segment replacements
+ ControllerTestUtils.getHelixResourceManager()
+
.revertReplaceSegments(OFFLINE_SEGMENTS_REPLACE_TEST_REFRESH_TABLE_NAME,
lineageEntryId3, false);
+ waitForSegmentsToDelete(OFFLINE_SEGMENTS_REPLACE_TEST_REFRESH_TABLE_NAME,
3, MAX_TIMEOUT_IN_MILLISECOND);
+ Assert.assertEquals(new
HashSet<>(ControllerTestUtils.getHelixResourceManager()
+ .getSegmentsFor(OFFLINE_SEGMENTS_REPLACE_TEST_REFRESH_TABLE_NAME,
true)),
+ new HashSet<>(Arrays.asList("s3", "s4", "s5")));
+
+ // Re-upload (s9, s10, s11) to test the segment clean up from
startReplaceSegments
Review comment:
added more comments.
--
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]