smengcl commented on code in PR #4486:
URL: https://github.com/apache/ozone/pull/4486#discussion_r1151260371
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/key/TestOMKeyPurgeRequestAndResponse.java:
##########
@@ -98,6 +113,36 @@ private OMRequest createPurgeKeysRequest(List<String>
deletedKeys) {
.build();
}
+ /**
+ * Create snapshot and checkpoint directory.
+ */
+ private SnapshotInfo createSnapshot(String snapshotName) throws Exception {
+ when(ozoneManager.isAdmin(any())).thenReturn(true);
+ BatchOperation batchOperation = omMetadataManager.getStore()
+ .initBatchOperation();
+ OMRequest omRequest = OMRequestTestUtils
+ .createSnapshotRequest(volumeName, bucketName, snapshotName);
+ // Pre-Execute OMSnapshotCreateRequest.
+ OMSnapshotCreateRequest omSnapshotCreateRequest =
+ TestOMSnapshotCreateRequest.doPreExecute(omRequest, ozoneManager);
+
+ // validateAndUpdateCache OMSnapshotCreateResponse.
+ OMSnapshotCreateResponse omClientResponse = (OMSnapshotCreateResponse)
+ omSnapshotCreateRequest.validateAndUpdateCache(ozoneManager, 1,
Review Comment:
nit
```suggestion
omSnapshotCreateRequest.validateAndUpdateCache(ozoneManager, 1L,
```
--
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]