Use IOUtils#close() where needed

This commit is contained in:
Simon Willnauer 2016-01-29 16:30:50 +01:00
parent ac87751b3d
commit 0bcee2df37

@ -18,6 +18,7 @@
*/ */
package org.elasticsearch.test; package org.elasticsearch.test;
import org.apache.lucene.util.IOUtils;
import org.elasticsearch.Version; import org.elasticsearch.Version;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder; import org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder;
@ -87,7 +88,7 @@ public abstract class ESSingleNodeTestCase extends ESTestCase {
private static void stopNode() throws IOException { private static void stopNode() throws IOException {
Node node = NODE; Node node = NODE;
NODE = null; NODE = null;
node.close(); IOUtils.close(node);
} }
private void cleanup(boolean resetNode) throws IOException { private void cleanup(boolean resetNode) throws IOException {