|
@@ -51,10 +51,7 @@ import org.elasticsearch.common.settings.Setting;
|
|
|
import org.elasticsearch.common.settings.Settings;
|
|
|
import org.elasticsearch.common.transport.TransportAddress;
|
|
|
import org.elasticsearch.common.unit.ByteSizeValue;
|
|
|
-import org.elasticsearch.common.util.BigArrays;
|
|
|
-import org.elasticsearch.common.util.MockBigArrays;
|
|
|
import org.elasticsearch.common.util.MockPageCacheRecycler;
|
|
|
-import org.elasticsearch.common.util.PageCacheRecycler;
|
|
|
import org.elasticsearch.common.util.concurrent.DeterministicTaskQueue;
|
|
|
import org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor;
|
|
|
import org.elasticsearch.core.Nullable;
|
|
@@ -68,7 +65,6 @@ import org.elasticsearch.gateway.ClusterStateUpdaters;
|
|
|
import org.elasticsearch.gateway.GatewayService;
|
|
|
import org.elasticsearch.gateway.MockGatewayMetaState;
|
|
|
import org.elasticsearch.gateway.PersistedClusterStateService;
|
|
|
-import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
|
|
|
import org.elasticsearch.monitor.NodeHealthService;
|
|
|
import org.elasticsearch.monitor.StatusInfo;
|
|
|
import org.elasticsearch.test.ESTestCase;
|
|
@@ -268,7 +264,6 @@ public class AbstractCoordinatorTestCase extends ESTestCase {
|
|
|
private final LinearizabilityChecker linearizabilityChecker = new LinearizabilityChecker();
|
|
|
private final History history = new History();
|
|
|
private final Recycler<BytesRef> recycler;
|
|
|
- private final BigArrays bigArrays;
|
|
|
private final NodeHealthService nodeHealthService;
|
|
|
|
|
|
private final Function<DiscoveryNode, MockPersistedState> defaultPersistedStateSupplier = MockPersistedState::new;
|
|
@@ -286,14 +281,9 @@ public class AbstractCoordinatorTestCase extends ESTestCase {
|
|
|
|
|
|
Cluster(int initialNodeCount, boolean allNodesMasterEligible, Settings nodeSettings, NodeHealthService nodeHealthService) {
|
|
|
this.nodeHealthService = nodeHealthService;
|
|
|
- if (usually()) {
|
|
|
- recycler = BytesRefRecycler.NON_RECYCLING_INSTANCE;
|
|
|
- bigArrays = BigArrays.NON_RECYCLING_INSTANCE;
|
|
|
- } else {
|
|
|
- final PageCacheRecycler pageCacheRecycler = new MockPageCacheRecycler(Settings.EMPTY);
|
|
|
- recycler = new BytesRefRecycler(pageCacheRecycler);
|
|
|
- bigArrays = new MockBigArrays(pageCacheRecycler, new NoneCircuitBreakerService());
|
|
|
- }
|
|
|
+ this.recycler = usually()
|
|
|
+ ? BytesRefRecycler.NON_RECYCLING_INSTANCE
|
|
|
+ : new BytesRefRecycler(new MockPageCacheRecycler(Settings.EMPTY));
|
|
|
deterministicTaskQueue.setExecutionDelayVariabilityMillis(DEFAULT_DELAY_VARIABILITY);
|
|
|
|
|
|
assertThat(initialNodeCount, greaterThan(0));
|