[TEST] Mmm, still wrap wrappers still its needed post closing dir
previous push was partial by mistake, we still need the wrapped dirs around after being closed for the test infra, for now, explicitly clear it in the leak test (which is still bad apple)
This commit is contained in:
parent
683050c6ed
commit
716cc5fb05
|
@ -28,6 +28,7 @@ import org.elasticsearch.index.shard.IndexShard;
|
|||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.test.ElasticsearchIntegrationTest;
|
||||
import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
|
||||
import org.elasticsearch.test.store.MockDirectoryHelper;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
@ -91,6 +92,7 @@ public class IndicesLeaksTests extends ElasticsearchIntegrationTest {
|
|||
shardInjector = null;
|
||||
|
||||
cluster().wipeIndices("test");
|
||||
MockDirectoryHelper.wrappers.clear(); // we need to clear this to allow the objects to recycle
|
||||
|
||||
for (int i = 0; i < 100; i++) {
|
||||
System.gc();
|
||||
|
|
|
@ -141,7 +141,6 @@ public class MockDirectoryHelper {
|
|||
synchronized (lock) {
|
||||
lock.notifyAll();
|
||||
}
|
||||
wrappers.remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue