Browse Source

This test has been randomly failing on Unix systems ever since their

file system is considered to have a granularity of a second.  Give it
the same treatment as Windows.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276189 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 21 years ago
parent
commit
90a2a192dc
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      src/testcases/org/apache/tools/ant/taskdefs/JarTest.java

+ 3
- 4
src/testcases/org/apache/tools/ant/taskdefs/JarTest.java View File

@@ -30,6 +30,7 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.apache.tools.ant.BuildFileTest;
import org.apache.tools.ant.taskdefs.condition.Os;
import org.apache.tools.ant.util.FileUtils;

/**
* @author Erik Meade <emeade@geekfarm.org>
@@ -124,10 +125,8 @@ public class JarTest extends BuildFileTest {

private void testRecreate(String firstTarget, String secondTarget) {
executeTarget(firstTarget);
int sleeptime = 2500;
if (Os.isFamily("windows")) {
sleeptime += 2500;
}
long sleeptime = 3000
+ FileUtils.newFileUtils().getFileTimestampGranularity();
try {
Thread.currentThread().sleep(sleeptime);
} catch (InterruptedException e) {


Loading…
Cancel
Save