chihsuan commented on code in PR #11123:
URL: https://github.com/apache/ozone/pull/11123#discussion_r3925247025
##########
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/tasks/TestNSSummaryTaskWithOBS.java:
##########
@@ -63,6 +72,20 @@ false, getBucketLayout(),
getReconOMMetadataManager(), threshold, 5, 20, 2000);
}
+ @Test
+ void testReprocessCachesBucketInfoPerWorker() throws IOException {
+ ReconOMMetadataManager omMetadataManager =
spy(getReconOMMetadataManager());
+ Table<String, OmBucketInfo> bucketTable =
spy(getReconOMMetadataManager().getBucketTable());
+ doReturn(bucketTable).when(omMetadataManager).getBucketTable();
+ NSSummaryTaskWithOBS task = new
NSSummaryTaskWithOBS(getReconNamespaceSummaryManager(), omMetadataManager,
+ OZONE_RECON_NSSUMMARY_FLUSH_TO_DB_MAX_THRESHOLD_DEFAULT, 1, 1, 2000);
+
+ getReconNamespaceSummaryManager().clearNSSummaryTable();
+
+ assertThat(task.reprocessWithOBS(omMetadataManager)).isTrue();
+ verify(bucketTable, times(2)).getSkipCache(anyString());
Review Comment:
Would it be possible to make the bucket/key setup local to this test? The
hard-coded `times(2)` currently depends on the shared fixture containing
exactly two buckets, so an unrelated fixture change could break this test.
--
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]