aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2017-08-12 14:31:16 -0700
committerTerry Parker <tparker@google.com>2017-10-18 17:35:27 -0700
commit7cd5d77ae37ad7febb6d6e7410da4e7b35348fce (patch)
treea802f8dc77aee913b26e420b4ba81f867ef8e007 /org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test
parent4b75d5223ac06dd5710e8b01a48e1bfa5c167b0e (diff)
downloadjgit-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/src/org/eclipse/jgit/http/test')
-rw-r--r--org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java7
1 files changed, 3 insertions, 4 deletions
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();
}
}
}