]> source.dussan.org Git - jgit.git/commitdiff
Fix Buck build broken by 4812fda. 20/70720/2
authorMike Edgar <adgar@google.com>
Wed, 13 Apr 2016 02:23:08 +0000 (22:23 -0400)
committerMike Edgar <adgar@google.com>
Fri, 15 Apr 2016 03:00:35 +0000 (23:00 -0400)
Creates a source directory under org.eclipse.jgit.http.test
for the new support class.

Signed-off-by: Michael Edgar <adgar@google.com>
Change-Id: Ie49492c2bbe5c1db96ceb0dc06fa7cb9f927431a

org.eclipse.jgit.http.test/pom.xml
org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java [new file with mode: 0644]
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java [deleted file]
pom.xml

index 31fda8b242a5e20049aa5e056837779df80511a1..69ffe4954be48ad2dc544ede0df994af7986b29d 100644 (file)
@@ -72,7 +72,6 @@
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit</artifactId>
       <version>${project.version}</version>
-      <scope>test</scope>
     </dependency>
 
     <dependency>
   </dependencies>
 
   <build>
+    <sourceDirectory>src/</sourceDirectory>
     <testSourceDirectory>tst/</testSourceDirectory>
 
     <testResources>
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
new file mode 100644 (file)
index 0000000..485cced
--- /dev/null
@@ -0,0 +1,52 @@
+package org.eclipse.jgit.http.test;
+
+import java.io.IOException;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription;
+import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
+import org.eclipse.jgit.lib.RefDatabase;
+
+/**
+ * An {@link InMemoryRepository} whose refs can be made unreadable for testing
+ * purposes.
+ */
+class RefsUnreadableInMemoryRepository extends InMemoryRepository {
+
+       private final RefsUnreadableRefDatabase refs;
+
+       private volatile boolean failing;
+
+       RefsUnreadableInMemoryRepository(DfsRepositoryDescription repoDesc) {
+               super(repoDesc);
+               refs = new RefsUnreadableRefDatabase();
+               failing = false;
+       }
+
+       @Override
+       public RefDatabase getRefDatabase() {
+               return refs;
+       }
+
+       /**
+        * Make the ref database unable to scan its refs.
+        * <p>
+        * It may be useful to follow a call to startFailing with a call to
+        * {@link RefDatabase#refresh()}, ensuring the next ref read fails.
+        */
+       void startFailing() {
+               failing = true;
+       }
+
+       private class RefsUnreadableRefDatabase extends MemRefDatabase {
+
+               @Override
+               protected RefCache scanAllRefs() throws IOException {
+                       if (failing) {
+                               throw new IOException("disk failed, no refs found");
+                       } else {
+                               return super.scanAllRefs();
+                       }
+               }
+       }
+}
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java
deleted file mode 100644 (file)
index 485cced..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.eclipse.jgit.http.test;
-
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription;
-import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
-import org.eclipse.jgit.lib.RefDatabase;
-
-/**
- * An {@link InMemoryRepository} whose refs can be made unreadable for testing
- * purposes.
- */
-class RefsUnreadableInMemoryRepository extends InMemoryRepository {
-
-       private final RefsUnreadableRefDatabase refs;
-
-       private volatile boolean failing;
-
-       RefsUnreadableInMemoryRepository(DfsRepositoryDescription repoDesc) {
-               super(repoDesc);
-               refs = new RefsUnreadableRefDatabase();
-               failing = false;
-       }
-
-       @Override
-       public RefDatabase getRefDatabase() {
-               return refs;
-       }
-
-       /**
-        * Make the ref database unable to scan its refs.
-        * <p>
-        * It may be useful to follow a call to startFailing with a call to
-        * {@link RefDatabase#refresh()}, ensuring the next ref read fails.
-        */
-       void startFailing() {
-               failing = true;
-       }
-
-       private class RefsUnreadableRefDatabase extends MemRefDatabase {
-
-               @Override
-               protected RefCache scanAllRefs() throws IOException {
-                       if (failing) {
-                               throw new IOException("disk failed, no refs found");
-                       } else {
-                               return super.scanAllRefs();
-                       }
-               }
-       }
-}
diff --git a/pom.xml b/pom.xml
index a691b8ea90b93ee76fcc494606ceb5618e00ef7f..e80d4fb1fe19aa94779e2715f740787720362f8a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <configuration>
           <encoding>${project.build.sourceEncoding}</encoding>
           <quiet>true</quiet>
+          <excludePackageNames>org.eclipse.jgit.http.test</excludePackageNames>
           <links>
             <link>http://docs.oracle.com/javase/7/docs/api</link>
           </links>