summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2012-10-06 12:56:00 +0200
committerShawn O. Pearce <spearce@spearce.org>2012-10-25 14:48:48 -0700
commit243e14d051852cc38cff773571e42d42cadfe50e (patch)
tree72536c3c2514f141dd3b3a3e542935b179d0e33d /org.eclipse.jgit.test/tst/org/eclipse
parentcd61e85fa1c78b2f0f9d62fb7bb785cc7af45c4b (diff)
downloadjgit-243e14d051852cc38cff773571e42d42cadfe50e.tar.gz
jgit-243e14d051852cc38cff773571e42d42cadfe50e.zip
Add a check in fstick that the reference file exists
This helps avoiding some stupid thinkos. Change-Id: I5b386cd9c6bf0e11f270bb2b8cfaac66ce9b341b
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java
index 60b9462a05..60408054be 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java
@@ -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