GSharayu commented on code in PR #10303:
URL: https://github.com/apache/pinot/pull/10303#discussion_r1113429711
##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/MergeRollupMinionClusterIntegrationTest.java:
##########
@@ -626,6 +625,23 @@ public void testOfflineTableSingleLevelRollup()
assertTrue(MetricValueUtils.gaugeExists(_controllerStarter.getControllerMetrics(),
"mergeRollupTaskDelayInNumBuckets.myTable2_OFFLINE.150days"));
+
+ JsonNode metadataResponseWithReplacedSegments =
JsonUtils.stringToJsonNode(sendGetRequest(
+ _controllerBaseApiUrl + "/tables/" + SINGLE_LEVEL_ROLLUP_TEST_TABLE
+ + "/metadata?excludeReplacedSegments=false"));
+ JsonNode metadataResponseWithoutReplacedSegments =
JsonUtils.stringToJsonNode(sendGetRequest(
+ _controllerBaseApiUrl + "/tables/" + SINGLE_LEVEL_ROLLUP_TEST_TABLE
+ + "/metadata?excludeReplacedSegments=true"));
+
+ String tableNameWithType =
TableNameBuilder.OFFLINE.tableNameWithType(SINGLE_LEVEL_ROLLUP_TEST_TABLE);
+ assertEquals(_helixResourceManager.getSegmentsFor(tableNameWithType,
true).size(),
+ metadataResponseWithoutReplacedSegments.get("numSegments").asInt());
+ assertEquals(_helixResourceManager.getSegmentsFor(tableNameWithType,
false).size(),
+ metadataResponseWithReplacedSegments.get("numSegments").asInt());
+
+ int numRowsFromMetadataWithoutReplacedSegments =
metadataResponseWithoutReplacedSegments.get("numRows").asInt();
+ assertNotEquals(metadataResponseWithReplacedSegments,
metadataResponseWithoutReplacedSegments);
+ assertEquals(numRowsAfterMergeTasks,
numRowsFromMetadataWithoutReplacedSegments);
Review Comment:
Apart from consistent push, If possible, we should also add a unit test
which verifies /metadata endpoint independently
--
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]