Test: StaticIndexBackwardCompatibilityTest.unloadIndex should call assertAllFilesClosed

That method checks that files were release properly, but also clears a static map holding references to mock directories. Since we iterate on many indexes this created memory pressure.
This commit is contained in:
Boaz Leskes 2015-02-05 12:12:25 +01:00
parent 97ac2f5144
commit 1b8c0056d3

View File

@ -33,7 +33,6 @@ import org.elasticsearch.test.ElasticsearchIntegrationTest;
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
import java.io.File;
import java.net.InetSocketAddress;
import java.nio.file.Paths;
@ -58,6 +57,7 @@ public class StaticIndexBackwardCompatibilityTest extends ElasticsearchIntegrati
public void unloadIndex() throws Exception {
ElasticsearchAssertions.assertAcked(client().admin().indices().prepareDelete("test").get());
while (internalCluster().stopRandomDataNode()) {} // stop all data nodes
ElasticsearchAssertions.assertAllFilesClosed();
}
void assertIndexSanity() {