mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-20 03:45:02 +00:00
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:
parent
97ac2f5144
commit
1b8c0056d3
@ -33,7 +33,6 @@ import org.elasticsearch.test.ElasticsearchIntegrationTest;
|
|||||||
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
|
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
|
||||||
import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
|
import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
@ -58,6 +57,7 @@ public class StaticIndexBackwardCompatibilityTest extends ElasticsearchIntegrati
|
|||||||
public void unloadIndex() throws Exception {
|
public void unloadIndex() throws Exception {
|
||||||
ElasticsearchAssertions.assertAcked(client().admin().indices().prepareDelete("test").get());
|
ElasticsearchAssertions.assertAcked(client().admin().indices().prepareDelete("test").get());
|
||||||
while (internalCluster().stopRandomDataNode()) {} // stop all data nodes
|
while (internalCluster().stopRandomDataNode()) {} // stop all data nodes
|
||||||
|
ElasticsearchAssertions.assertAllFilesClosed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void assertIndexSanity() {
|
void assertIndexSanity() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user