aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2019-07-10 16:22:15 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2019-07-19 14:45:55 +0200
commiteda2e95fa8748813cbcfc7b7fbedefb002999cfa (patch)
tree185c8c939206a25dbad82d41ec4a1f60ab6b6d14 /org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs
parent93144f1438b58264b9fe0dfed195407bc9c0ab1b (diff)
downloadjgit-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.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs')
-rw-r--r--org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/LfsServerTest.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/LfsServerTest.java b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/LfsServerTest.java
index 10823b8788..63af6eb52b 100644
--- a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/LfsServerTest.java
+++ b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/LfsServerTest.java
@@ -82,6 +82,7 @@ import org.eclipse.jgit.lfs.lib.LongObjectId;
import org.eclipse.jgit.lfs.server.LargeFileRepository;
import org.eclipse.jgit.lfs.server.LfsProtocolServlet;
import org.eclipse.jgit.lfs.test.LongObjectIdTestUtils;
+import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.FileUtils;
import org.eclipse.jgit.util.IO;
import org.junit.After;
@@ -119,6 +120,11 @@ public abstract class LfsServerTest {
@Before
public void setup() throws Exception {
tmp = Files.createTempDirectory("jgit_test_");
+
+ // measure timer resolution before the test to avoid time critical tests
+ // are affected by time needed for measurement
+ FS.getFsTimerResolution(tmp.getParent());
+
server = new AppServer();
ServletContextHandler app = server.addContext("/lfs");
dir = Paths.get(tmp.toString(), "lfs");