Don't swallow IOException in GC.PidLock#lock
This broke the test GcConcurrentTest#testInterruptGc which expects ClosedByInterruptException when the thread doing gc is interrupted. Change-Id: I89e02fc37aceeccb04c20cfc5b71cb8fa21793d6
This commit is contained in:
parent
a6da439b47
commit
49f5273867
|
@ -1631,7 +1631,7 @@ private class PidLock implements AutoCloseable {
|
|||
pidFile = repo.getDirectory().toPath().resolve(GC_PID);
|
||||
}
|
||||
|
||||
boolean lock() {
|
||||
boolean lock() throws IOException {
|
||||
if (Files.exists(pidFile)) {
|
||||
Instant mtime = FS.DETECTED
|
||||
.lastModifiedInstant(pidFile.toFile());
|
||||
|
@ -1670,7 +1670,7 @@ boolean lock() {
|
|||
JGitText.get().closePidLockFailed, pidFile),
|
||||
e1);
|
||||
}
|
||||
return false;
|
||||
throw e;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue