]> source.dussan.org Git - jgit.git/commit
Fix RacyGitTests#testRacyGitDetection 36/144336/9
authorMatthias Sohn <matthias.sohn@sap.com>
Tue, 18 Jun 2019 09:32:59 +0000 (11:32 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 3 Jul 2019 19:34:27 +0000 (21:34 +0200)
commit1159f9dd7c80a53c2509cd75d997a6afed37f9a6
tree7cf8b6db22d0f4eaf82cc2b3a2486ebb00d1d6b1
parentdf637928d2ef4b9ee06af7e37344c7848f870ce4
Fix RacyGitTests#testRacyGitDetection

This test case assumed file system timestamp resolution of 1 second. On
filesystems with a finer resolution this test fails since the index
entry is only smudged if the file index entry's lastModified and the
lastModified of the git index itself are within the same filesystem
timer tick. Fix this by ensuring that these timestamps are identical
which should work for any filesystem timer resolution.

Bug: 548188
Change-Id: Id84d59e1cfeb48fa008f8f27f2f892c4f73985de
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RacyGitTests.java