[TESTS] Don't create an unclosed threadpool in BigArraysTests.
This commit is contained in:
parent
7343ae1911
commit
d67e013e08
|
@ -27,20 +27,18 @@ import org.elasticsearch.common.settings.ImmutableSettings;
|
|||
import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService;
|
||||
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
|
||||
import org.elasticsearch.node.settings.NodeSettingsService;
|
||||
import org.elasticsearch.test.ElasticsearchTestCase;
|
||||
import org.elasticsearch.test.ElasticsearchSingleNodeTest;
|
||||
import org.elasticsearch.test.cache.recycler.MockBigArrays;
|
||||
import org.elasticsearch.test.cache.recycler.MockPageCacheRecycler;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.junit.Before;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class BigArraysTests extends ElasticsearchTestCase {
|
||||
public class BigArraysTests extends ElasticsearchSingleNodeTest {
|
||||
|
||||
public static BigArrays randombigArrays() {
|
||||
final PageCacheRecycler recycler = randomBoolean() ? null : new MockPageCacheRecycler(ImmutableSettings.EMPTY, new ThreadPool("BigArraysTests"));
|
||||
final PageCacheRecycler recycler = randomBoolean() ? null : ElasticsearchSingleNodeTest.getInstanceFromNode(PageCacheRecycler.class);
|
||||
return new MockBigArrays(ImmutableSettings.EMPTY, recycler, new NoneCircuitBreakerService());
|
||||
}
|
||||
|
||||
|
|
|
@ -24,13 +24,13 @@ import com.carrotsearch.hppc.ObjectLongOpenHashMap;
|
|||
import com.carrotsearch.hppc.cursors.ObjectLongCursor;
|
||||
import org.apache.lucene.util.BytesRef;
|
||||
import org.apache.lucene.util.TestUtil;
|
||||
import org.elasticsearch.test.ElasticsearchTestCase;
|
||||
import org.elasticsearch.test.ElasticsearchSingleNodeTest;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class BytesRefHashTests extends ElasticsearchTestCase {
|
||||
public class BytesRefHashTests extends ElasticsearchSingleNodeTest {
|
||||
|
||||
BytesRefHash hash;
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
package org.elasticsearch.common.util;
|
||||
|
||||
import com.carrotsearch.hppc.DoubleObjectOpenHashMap;
|
||||
import org.elasticsearch.test.ElasticsearchTestCase;
|
||||
import org.elasticsearch.test.ElasticsearchSingleNodeTest;
|
||||
import org.junit.Test;
|
||||
|
||||
public class DoubleObjectHashMapTests extends ElasticsearchTestCase {
|
||||
public class DoubleObjectHashMapTests extends ElasticsearchSingleNodeTest {
|
||||
|
||||
@Test
|
||||
public void duel() {
|
||||
|
|
|
@ -22,12 +22,12 @@ package org.elasticsearch.common.util;
|
|||
import com.carrotsearch.hppc.LongLongMap;
|
||||
import com.carrotsearch.hppc.LongLongOpenHashMap;
|
||||
import com.carrotsearch.hppc.cursors.LongLongCursor;
|
||||
import org.elasticsearch.test.ElasticsearchTestCase;
|
||||
import org.elasticsearch.test.ElasticsearchSingleNodeTest;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class LongHashTests extends ElasticsearchTestCase {
|
||||
public class LongHashTests extends ElasticsearchSingleNodeTest {
|
||||
|
||||
LongHash hash;
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
package org.elasticsearch.common.util;
|
||||
|
||||
import com.carrotsearch.hppc.LongObjectOpenHashMap;
|
||||
import org.elasticsearch.test.ElasticsearchTestCase;
|
||||
import org.elasticsearch.test.ElasticsearchSingleNodeTest;
|
||||
import org.junit.Test;
|
||||
|
||||
public class LongObjectHashMapTests extends ElasticsearchTestCase {
|
||||
public class LongObjectHashMapTests extends ElasticsearchSingleNodeTest {
|
||||
|
||||
@Test
|
||||
public void duel() {
|
||||
|
|
Loading…
Reference in New Issue