Browse Source

Merge "Add a check in fstick that the reference file exists"

stable-2.2
Shawn Pearce 12 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
71ac75fea3
  1. 2
      org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java

2
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, public static long fsTick(File lastFile) throws InterruptedException,
IOException { IOException {
long sleepTime = 1; long sleepTime = 1;
if (lastFile != null && !lastFile.exists())
throw new FileNotFoundException(lastFile.getPath());
File tmp = File.createTempFile("FileTreeIteratorWithTimeControl", null); File tmp = File.createTempFile("FileTreeIteratorWithTimeControl", null);
try { try {
long startTime = (lastFile == null) ? tmp.lastModified() : lastFile long startTime = (lastFile == null) ? tmp.lastModified() : lastFile

Loading…
Cancel
Save