]> source.dussan.org Git - jgit.git/commitdiff
Fix unstable test 09/7909/6
authorRobin Rosenberg <robin.rosenberg@dewire.com>
Tue, 2 Oct 2012 10:45:29 +0000 (12:45 +0200)
committerChristian Halstrick <christian.halstrick@sap.com>
Tue, 2 Oct 2012 10:46:09 +0000 (12:46 +0200)
Add more time to a timestamp to safely go beyond the granularity of
the timestamp resolution of the file system. The lowest resolution we
know of is FAT with two second resolution. Then add some to make sure we
are above the limit.

Change-Id: I85c5b07dcdf2d80de41fe9b2354ccc888bad7f1e

org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitCommandTest.java

index 20d62f5316360bb09a06dfcdebcba0af1387445a..44f1a48c31dedecf47372204b45e9c954af44458 100644 (file)
@@ -321,7 +321,7 @@ public class CommitCommandTest extends RepositoryTestCase {
                db.getIndexFile().setLastModified(indexTime - 5000);
 
                write(file1, "content4");
-               assertTrue(file1.setLastModified(file1.lastModified() + 1000));
+               assertTrue(file1.setLastModified(file1.lastModified() + 2500));
                assertNotNull(git.commit().setMessage("edit file").setOnly("file1.txt")
                                .call());