diff options
author | Shawn Pearce <spearce@spearce.org> | 2017-08-12 14:31:16 -0700 |
---|---|---|
committer | Terry Parker <tparker@google.com> | 2017-10-18 17:35:27 -0700 |
commit | 7cd5d77ae37ad7febb6d6e7410da4e7b35348fce (patch) | |
tree | a802f8dc77aee913b26e420b4ba81f867ef8e007 /org.eclipse.jgit.http.test | |
parent | 4b75d5223ac06dd5710e8b01a48e1bfa5c167b0e (diff) | |
download | jgit-7cd5d77ae37ad7febb6d6e7410da4e7b35348fce.tar.gz jgit-7cd5d77ae37ad7febb6d6e7410da4e7b35348fce.zip |
dfs: Switch InMemoryRepository to DfsReftableDatabase
This ensure DfsReftableDatabase is tested by the same test suites that
use/test InMemoryRepository. It also simplifies the logic of
InMemoryRepository and brings its compatibility story closer to any
other DFS repository that uses reftables for its reference storage.
Change-Id: I881469fd77ed11a9239b477633510b8c482a19ca
Signed-off-by: Minh Thai <mthai@google.com>
Signed-off-by: Terry Parker <tparker@google.com>
Diffstat (limited to 'org.eclipse.jgit.http.test')
-rw-r--r-- | org.eclipse.jgit.http.test/META-INF/MANIFEST.MF | 1 | ||||
-rw-r--r-- | org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF index d927bd3d1e..c230c776d5 100644 --- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF @@ -31,6 +31,7 @@ Import-Package: javax.servlet;version="[2.5.0,3.2.0)", org.eclipse.jgit.internal;version="[4.10.0,4.11.0)", org.eclipse.jgit.internal.storage.dfs;version="[4.10.0,4.11.0)", org.eclipse.jgit.internal.storage.file;version="[4.10.0,4.11.0)", + org.eclipse.jgit.internal.storage.reftable;version="[4.9.0,4.11.0)", org.eclipse.jgit.junit;version="[4.10.0,4.11.0)", org.eclipse.jgit.junit.http;version="[4.10.0,4.11.0)", org.eclipse.jgit.lib;version="[4.10.0,4.11.0)", diff --git a/org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java b/org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java index a1e41d12d5..6174258c67 100644 --- a/org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java +++ b/org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java @@ -46,6 +46,7 @@ import java.io.IOException; import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription; import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository; +import org.eclipse.jgit.internal.storage.reftable.Reftable; import org.eclipse.jgit.lib.RefDatabase; /** @@ -80,14 +81,12 @@ class RefsUnreadableInMemoryRepository extends InMemoryRepository { } private class RefsUnreadableRefDatabase extends MemRefDatabase { - @Override - protected RefCache scanAllRefs() throws IOException { + protected Reftable reader() throws IOException { if (failing) { throw new IOException("disk failed, no refs found"); - } else { - return super.scanAllRefs(); } + return super.reader(); } } } |