sadanand48 commented on code in PR #12014:
URL: https://github.com/apache/ozone/pull/12014#discussion_r4680952592
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/diff/TestMergeJoinSnapDiffWriter.java:
##########
@@ -353,6 +354,46 @@ void testDependencyOrderingFallsBackWhenOverLimit() throws
Exception {
}
}
+ @Test
+ void testDependencyOrderingFallsBackOnCycle() throws Exception {
+ byte[] sig = signature("s");
+ SnapDiffJobStore store = spy(newStore(true));
+ try (SnapDiffJobStore ignored = store) {
+ // Files a and b swap names: each RENAME frees the path the other one
takes.
+ store.putNewList(301L, entry(BUCKET_OBJECT_ID, "b", false, sig));
+ store.putOldList(301L, entry(BUCKET_OBJECT_ID, "a", false, sig));
+ store.putNewList(302L, entry(BUCKET_OBJECT_ID, "a", false, sig));
+ store.putOldList(302L, entry(BUCKET_OBJECT_ID, "b", false, sig));
+ store.flushWrites();
+
+ Pair<Long, String> reportMeta =
writeReport(mockManagerPassthroughDeletes(), store,
+ BUCKET_OBJECT_ID, true, true, null);
Review Comment:
```suggestion
List<Double> progress = new ArrayList<>();
Pair<Long, String> reportMeta =
writeReport(mockManagerPassthroughDeletes(), store,
BUCKET_OBJECT_ID, true, true, progress::add);
assertThat(progress).last().isEqualTo(1.0);
```
probably pass a progress consumer and assert that its final value is 1.0
--
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]