jgit/org.eclipse.jgit.test
Matthias Sohn b513b77477 Measure file timestamp resolution used in FileSnapshot
FileSnapshot.notRacyClean() assumed a worst case filesystem timestamp
resolution of 2.5 sec (FAT has a resolution of 2 sec). Instead measure
timestamp resolution to avoid unnecessary IO caused by false positives
in detecting the racy git problem caused by finite filesystem timestamp
resolution [1].

Cache the measured resolution per FileStore since timestamp resolution
depends on the respective filesystem type. If timestamp resolution
cannot be measured or fails due to an exception fallback to the worst
case FAT timestamp resolution and avoid caching this value.

Add a 10% safety margin in FileSnapshot.notRacyClean(), though running
FsTest.testFsTimestampResolution() 1000 times which is not using a
safety margin didn't fail on Mac using APFS and Java 8, 11, 12.

Measured Java file timestamp resolution: [2]

[1] https://github.com/git/git/blob/master/Documentation/technical/racy-git.txt
[2] https://docs.google.com/spreadsheets/d/1imy0y6WmRqBf0kjCxzxj2X7M50eIVfa7oaUIzEOHmjo

Bug: 546891
Change-Id: I493f3b57b6b306285ffa7d392339d253e5966ab8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-05-22 08:13:22 +02:00
..
.settings Enable warning for resources not managed by try-with-resource 2018-03-03 23:58:47 +01:00
META-INF Prepare 5.1.8-SNAPSHOT builds 2019-04-20 10:51:17 +02:00
exttst/org/eclipse/jgit Deprecate Constants.CHARSET in favor of StandardCharsets.UTF_8 2018-09-04 10:53:10 +09:00
src/org/eclipse/jgit refactor: simplify collection.toArray() 2018-08-23 01:34:39 -04:00
tst/org/eclipse/jgit Measure file timestamp resolution used in FileSnapshot 2019-05-22 08:13:22 +02:00
tst-rsrc Support -merge attribute in binary macro 2017-06-27 10:33:50 +02:00
.classpath Change JGit minimum execution environment to JavaSE-1.8 2016-09-20 11:32:36 +02:00
.gitignore Extend the FS class for Java7 2013-05-04 02:01:56 +02:00
.project Remove references to org.eclipse.jgit.java7 2016-08-05 11:22:27 +09:00
BUILD Bazel: Format all build files with buildifier 0.15.0 2018-08-30 15:27:20 +09:00
build.properties Add missing dependency to slf4j-log4j bridge 2016-09-05 04:53:14 -04:00
org.eclipse.jgit.core--All-Tests (Java 8) (de).launch Fixed few locale dependent pgm tests 2016-01-02 17:41:58 +01:00
org.eclipse.jgit.core--All-Tests (Java 8).launch Fix classpath of test launch configurations 2015-11-21 00:33:43 +01:00
org.eclipse.jgit.core--All-Tests.launch Use JUnit4 for tests 2010-08-26 12:26:38 -05:00
org.eclipse.jgit.test-WalkEncryptionTest-Proxy.launch Adding AES Walk Encryption support in http://www.jets3t.org/ mode 2015-10-18 19:14:31 +00:00
org.eclipse.jgit.test-WalkEncryptionTest.launch Adding AES Walk Encryption support in http://www.jets3t.org/ mode 2015-10-18 19:14:31 +00:00
plugin.properties Fix plugin provider names to conform with release train requirement 2013-04-08 23:05:36 +02:00
pom.xml Prepare 5.1.8-SNAPSHOT builds 2019-04-20 10:51:17 +02:00
tests.bzl Merge branch 'stable-5.0' into stable-5.1 2018-08-31 16:11:37 +09:00