diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2019-07-10 16:22:15 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-07-19 14:45:55 +0200 |
commit | eda2e95fa8748813cbcfc7b7fbedefb002999cfa (patch) | |
tree | 185c8c939206a25dbad82d41ec4a1f60ab6b6d14 /org.eclipse.jgit.junit | |
parent | 93144f1438b58264b9fe0dfed195407bc9c0ab1b (diff) | |
download | jgit-eda2e95fa8748813cbcfc7b7fbedefb002999cfa.tar.gz jgit-eda2e95fa8748813cbcfc7b7fbedefb002999cfa.zip |
Measure filesystem timestamp resolution already in test setup
This helps to avoid some time critical tests can't prepare the test
fixture intended since measuring timestamp resolution takes time.
Change-Id: Ib34023e682a106070ca97e98ef16789a4dfb97b4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.junit')
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java index 50e6f2da5a..af688d2349 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java @@ -127,6 +127,10 @@ public abstract class LocalDiskRepositoryTestCase { if (!tmp.delete() || !tmp.mkdir()) throw new IOException("Cannot create " + tmp); + // measure timer resolution before the test to avoid time critical tests + // are affected by time needed for measurement + FS.getFsTimerResolution(tmp.toPath().getParent()); + mockSystemReader = new MockSystemReader(); mockSystemReader.userGitConfig = new FileBasedConfig(new File(tmp, "usergitconfig"), FS.DETECTED); |