https://issues.apache.org/jira/browse/AMQ-4705 - ensure cached lastModified is externally visible - hardened test showed window for missed mod

This commit is contained in:
gtully 2015-05-14 13:48:14 +01:00
parent fee7c1cf4c
commit 181e4d4617
1 changed files with 1 additions and 0 deletions

View File

@ -83,6 +83,7 @@ public class LockFile {
}
if (lock != null) {
//Set lastModified only if we are able to successfully obtain the lock.
readFile.getChannel().force(true);
lastModified = file.lastModified();
lockCounter++;
System.setProperty(getVmLockKey(), new Date().toString());