swamirishi commented on code in PR #8982:
URL: https://github.com/apache/ozone/pull/8982#discussion_r2311889255


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotLocalDataYaml.java:
##########
@@ -95,55 +119,62 @@ private File writeToYaml(String snapshotName) throws 
IOException {
     // Check YAML file exists
     assertTrue(yamlFile.exists());
 
-    return yamlFile;
+    return Pair.of(yamlFile, previousSnapshotId);
   }
 
   @Test
   public void testWriteToYaml() throws IOException {
-    File yamlFile = writeToYaml("snapshot1");
+    Pair<File, UUID> yamlFilePrevIdPair = writeToYaml("snapshot1");
+    File yamlFile = yamlFilePrevIdPair.getLeft();
+    UUID prevSnapId = yamlFilePrevIdPair.getRight();
 
     // Read from YAML file
     OmSnapshotLocalDataYaml snapshotData = 
OmSnapshotLocalDataYaml.getFromYamlFile(yamlFile);
 
     // Verify fields
-    assertEquals(42, snapshotData.getVersion());
+    assertEquals(44, snapshotData.getVersion());

Review Comment:
   this would be 44 since version is going to be auto incremented every time a 
new version is added



-- 
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]

Reply via email to