Skip to content

Commit 860ee37

Browse files
committed
[IO-164] change test case setup to work around apparent Java bug on OS X
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@650580 13f79535-47bb-0310-9956-ffa450edef68
1 parent 5842609 commit 860ee37

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/test/org/apache/commons/io/comparator/LastModifiedFileComparatorTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ protected void setUp() throws Exception {
6363
createFile(olderFile, 0);
6464

6565
File newerFile = new File(dir, "newer.txt");
66+
createFile(newerFile, 0);
6667
do {
6768
try {
6869
Thread.sleep(300);
6970
} catch(InterruptedException ie) {
7071
// ignore
7172
}
72-
createFile(newerFile, 0);
73+
newerFile.setLastModified(System.currentTimeMillis());
7374
} while( olderFile.lastModified() == newerFile.lastModified() );
7475
equalFile1 = olderFile;
7576
equalFile2 = olderFile;

0 commit comments

Comments
 (0)