Search in sources :

Example 1 with ClusterApplier

use of org.opensearch.cluster.service.ClusterApplier in project OpenSearch by opensearch-project.

the class DiscoveryModuleTests method setupDummyServices.

@Before
public void setupDummyServices() {
    threadPool = mock(ThreadPool.class);
    when(threadPool.getThreadContext()).thenReturn(new ThreadContext(Settings.EMPTY));
    transportService = MockTransportService.createNewService(Settings.EMPTY, Version.CURRENT, threadPool, null);
    masterService = mock(MasterService.class);
    namedWriteableRegistry = new NamedWriteableRegistry(Collections.emptyList());
    clusterApplier = mock(ClusterApplier.class);
    clusterSettings = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS);
    gatewayMetaState = mock(GatewayMetaState.class);
}
Also used : NamedWriteableRegistry(org.opensearch.common.io.stream.NamedWriteableRegistry) ClusterSettings(org.opensearch.common.settings.ClusterSettings) ThreadPool(org.opensearch.threadpool.ThreadPool) ThreadContext(org.opensearch.common.util.concurrent.ThreadContext) ClusterApplier(org.opensearch.cluster.service.ClusterApplier) MasterService(org.opensearch.cluster.service.MasterService) GatewayMetaState(org.opensearch.gateway.GatewayMetaState) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 ClusterApplier (org.opensearch.cluster.service.ClusterApplier)1 MasterService (org.opensearch.cluster.service.MasterService)1 NamedWriteableRegistry (org.opensearch.common.io.stream.NamedWriteableRegistry)1 ClusterSettings (org.opensearch.common.settings.ClusterSettings)1 ThreadContext (org.opensearch.common.util.concurrent.ThreadContext)1 GatewayMetaState (org.opensearch.gateway.GatewayMetaState)1 ThreadPool (org.opensearch.threadpool.ThreadPool)1