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 cce83c00b..f8f0c18cb 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 @@ -130,6 +130,13 @@ public abstract class LocalDiskRepositoryTestCase { mockSystemReader = new MockSystemReader(); SystemReader.setInstance(mockSystemReader); + + // Measure timer resolution before the test to avoid time critical tests + // are affected by time needed for measurement. + // The MockSystemReader must be configured first since we need to use + // the same one here + FS.getFileStoreAttributes(tmp.toPath().getParent()); + mockSystemReader.userGitConfig = new FileBasedConfig(new File(tmp, "usergitconfig"), FS.DETECTED); // We have to set autoDetach to false for tests, because tests expect to be able @@ -140,12 +147,6 @@ public abstract class LocalDiskRepositoryTestCase { mockSystemReader.userGitConfig.save(); ceilTestDirectories(getCeilings()); - // Measure timer resolution before the test to avoid time critical tests - // are affected by time needed for measurement. - // The MockSystemReader must be configured first since we need to use - // the same one here - FS.getFileStoreAttributes(tmp.toPath().getParent()); - author = new PersonIdent("J. Author", "jauthor@example.com"); committer = new PersonIdent("J. Committer", "jcommitter@example.com");