mirror of https://github.com/apache/lucene.git
LUCENE-5577: the cleanup code didn't cleanup after itself...
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1585053 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f8c0e119ba
commit
a0e6d12d00
|
@ -2337,8 +2337,15 @@ public abstract class LuceneTestCase extends Assert {
|
|||
}
|
||||
|
||||
private static class TemporaryFilesCleanupRule extends TestRuleAdapter {
|
||||
@Override
|
||||
protected void before() throws Throwable {
|
||||
super.before();
|
||||
assert tempDirBase == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void afterAlways(List<Throwable> errors) throws Throwable {
|
||||
try {
|
||||
if (LuceneTestCase.suiteFailureMarker.wasSuccessful()) {
|
||||
synchronized (cleanupQueue) {
|
||||
File [] everything = new File [cleanupQueue.size()];
|
||||
|
@ -2368,6 +2375,9 @@ public abstract class LuceneTestCase extends Assert {
|
|||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
tempDirBase = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue