This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/1.22 by this push:
new 054526d18e OAK-10404: improve TarFilesTest.testCollectBlobReferences
diagnostics (#1074)
054526d18e is described below
commit 054526d18e907a0beb9be21ce571aea02c7d6e1b
Author: Julian Reschke <[email protected]>
AuthorDate: Wed Aug 16 14:10:47 2023 +0200
OAK-10404: improve TarFilesTest.testCollectBlobReferences diagnostics
(#1074)
---
.../apache/jackrabbit/oak/segment/file/tar/TarFilesTest.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git
a/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/file/tar/TarFilesTest.java
b/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/file/tar/TarFilesTest.java
index 41cac37a94..9a3f2cdbba 100644
---
a/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/file/tar/TarFilesTest.java
+++
b/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/file/tar/TarFilesTest.java
@@ -268,13 +268,17 @@ public class TarFilesTest {
@Test
public void testCollectBlobReferences() throws Exception {
- writeSegmentWithBinaryReferences(randomUUID());
- writeSegmentWithBinaryReferences(randomUUID(), "a");
- writeSegmentWithBinaryReferences(randomUUID(), "b", "c");
+ UUID u1 = randomUUID();
+ writeSegmentWithBinaryReferences(u1);
+ UUID u2 = randomUUID();
+ writeSegmentWithBinaryReferences(u2, "a");
+ UUID u3 = randomUUID();
+ writeSegmentWithBinaryReferences(u3, "b", "c");
Set<String> references = new HashSet<>();
tarFiles.collectBlobReferences(references::add, gen -> false);
- assertEquals(references, new HashSet<>(asList("a", "b", "c")));
+ assertEquals("unexpected results for collectBlobReferences, UUIDs were
" + u1 + ", " + u2 + " and " + u3,
+ new HashSet<>(asList("a", "b", "c")), references);
}
@Test