mirror of https://github.com/apache/lucene.git
Fix problem with open files on windows (this was not caused by Robert's commits, it just did never happen because GC was faster)...
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1624837 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
535454eb25
commit
023f541b51
|
@ -32,7 +32,7 @@ import org.apache.lucene.benchmark.byTask.tasks.TaskSequence;
|
||||||
/**
|
/**
|
||||||
* Test algorithm, as read from file
|
* Test algorithm, as read from file
|
||||||
*/
|
*/
|
||||||
public class Algorithm {
|
public class Algorithm implements AutoCloseable {
|
||||||
|
|
||||||
private TaskSequence sequence;
|
private TaskSequence sequence;
|
||||||
private final String[] taskPackages;
|
private final String[] taskPackages;
|
||||||
|
@ -359,5 +359,10 @@ public class Algorithm {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() throws Exception {
|
||||||
|
sequence.close();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ public class TestPerfTasksParse extends LuceneTestCase {
|
||||||
config.set("query.maker", MockQueryMaker.class.getName());
|
config.set("query.maker", MockQueryMaker.class.getName());
|
||||||
}
|
}
|
||||||
PerfRunData data = new PerfRunData(config);
|
PerfRunData data = new PerfRunData(config);
|
||||||
new Algorithm(data);
|
try (Algorithm algo = new Algorithm(data)) {}
|
||||||
foundFiles = true;
|
foundFiles = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue