]> source.dussan.org Git - jgit.git/commitdiff
Add a check in fstick that the reference file exists 71/8071/7
authorRobin Rosenberg <robin.rosenberg@dewire.com>
Sat, 6 Oct 2012 10:56:00 +0000 (12:56 +0200)
committerShawn O. Pearce <spearce@spearce.org>
Thu, 25 Oct 2012 21:48:48 +0000 (14:48 -0700)
This helps avoiding some stupid thinkos.

Change-Id: I5b386cd9c6bf0e11f270bb2b8cfaac66ce9b341b

org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java

index 60b9462a05148d72c63335fa136ff8dd8ae7eb82..60408054be7ce68e4777af14f307f95de2033a77 100644 (file)
@@ -371,6 +371,8 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
        public static long fsTick(File lastFile) throws InterruptedException,
                        IOException {
                long sleepTime = 1;
+               if (lastFile != null && !lastFile.exists())
+                       throw new FileNotFoundException(lastFile.getPath());
                File tmp = File.createTempFile("FileTreeIteratorWithTimeControl", null);
                try {
                        long startTime = (lastFile == null) ? tmp.lastModified() : lastFile