peterxcli commented on code in PR #11321:
URL: https://github.com/apache/ozone/pull/11321#discussion_r4111708010


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDiffManager.java:
##########
@@ -1564,6 +1564,24 @@ public void 
testSubmitSnapshotDiffResubmitsWhenPreviouslyCancelled()
     assertEquals(IN_PROGRESS, updated.getStatus());
   }
 
+  @Test
+  public void testUpdateJobStatusToDoneSkipsSupersededJob() throws IOException 
{
+    SnapDiffTestContext ctx = setupRandomSnapDiffTestContext();
+    String liveJobId = UUID.randomUUID().toString();
+    snapshotDiffManager.getSnapDiffJobTable().put(ctx.diffJobKey,
+        new SnapshotDiffJob(0L, liveJobId, IN_PROGRESS, ctx.volumeName, 
ctx.bucketName,
+            ctx.fromSnapshotName, ctx.toSnapshotName, false, false, 0L, null, 
0.0, null));

Review Comment:
   Any chance we could have e2e regression test too? because we are currently 
control the db entries directly. would like to see what series of operation 
cause  error without this patch.



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