diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2019-10-16 13:33:20 -0400 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2019-10-16 13:33:20 -0400 |
commit | 3b96aeb2c96ae3b45103b5ed2eb0357ace70899d (patch) | |
tree | 9ff0c23dc8e57d4f55a7b0de203902ee6ae5b415 /org.eclipse.jgit.test/tst | |
parent | 51b24ea17c4f08f53af46ab774b0a2d80c37dc2e (diff) | |
parent | 218bacdc1f96942701503aa7891707bb3eccc111 (diff) | |
download | jgit-3b96aeb2c96ae3b45103b5ed2eb0357ace70899d.tar.gz jgit-3b96aeb2c96ae3b45103b5ed2eb0357ace70899d.zip |
Merge "reftable: fix lookup by ID in merged reftables"
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/MergedReftableTest.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/MergedReftableTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/MergedReftableTest.java index c20db7b96b..5f5ab72671 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/MergedReftableTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/MergedReftableTest.java @@ -187,6 +187,19 @@ public class MergedReftableTest { } } + @Test + public void tableByIDDeletion() throws IOException { + List<Ref> delta1 = Arrays.asList( + ref("refs/heads/apple", 1), + ref("refs/heads/master", 2)); + List<Ref> delta2 = Arrays.asList(ref("refs/heads/master", 3)); + + MergedReftable mr = merge(write(delta1), write(delta2)); + try (RefCursor rc = mr.byObjectId(id(2))) { + assertFalse(rc.next()); + } + } + @SuppressWarnings("boxing") @Test public void fourTableScan() throws IOException { |