mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-5568 - verify delete return code for win platform failure. Thanks to Erik Wramner for the heads up
This commit is contained in:
parent
c08efbe6c2
commit
86c826c461
|
@ -35,16 +35,18 @@ public class LockFileTest {
|
||||||
|
|
||||||
underTest.lock();
|
underTest.lock();
|
||||||
|
|
||||||
lockFile.delete();
|
// will fail on windows b/c the file is open
|
||||||
|
if ( lockFile.delete() ) {
|
||||||
|
|
||||||
assertFalse("no longer valid", underTest.keepAlive());
|
assertFalse("no longer valid", underTest.keepAlive());
|
||||||
|
|
||||||
// a slave gets in
|
// a slave gets in
|
||||||
lockFile.createNewFile();
|
lockFile.createNewFile();
|
||||||
|
|
||||||
underTest.unlock();
|
underTest.unlock();
|
||||||
|
|
||||||
assertTrue("file still exists after unlock when not locked", lockFile.exists());
|
assertTrue("file still exists after unlock when not locked", lockFile.exists());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue