Search in sources :

Example 1 with MockTransport

use of org.opensearch.test.transport.MockTransport in project OpenSearch by opensearch-project.

the class ClusterBootstrapServiceTests method createServices.

@Before
public void createServices() {
    localNode = newDiscoveryNode("local");
    otherNode1 = newDiscoveryNode("other1");
    otherNode2 = newDiscoveryNode("other2");
    deterministicTaskQueue = new DeterministicTaskQueue(builder().put(NODE_NAME_SETTING.getKey(), "node").build(), random());
    final MockTransport transport = new MockTransport() {

        @Override
        protected void onSendRequest(long requestId, String action, TransportRequest request, DiscoveryNode node) {
            throw new AssertionError("unexpected " + action);
        }
    };
    transportService = transport.createTransportService(Settings.EMPTY, deterministicTaskQueue.getThreadPool(), TransportService.NOOP_TRANSPORT_INTERCEPTOR, boundTransportAddress -> localNode, null, emptySet());
}
Also used : NodeRoles.nonMasterNode(org.opensearch.test.NodeRoles.nonMasterNode) Matchers.not(org.hamcrest.Matchers.not) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Version(org.opensearch.Version) OpenSearchException(org.opensearch.OpenSearchException) AtomicReference(java.util.concurrent.atomic.AtomicReference) Supplier(java.util.function.Supplier) Collections.singletonList(java.util.Collections.singletonList) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) BOOTSTRAP_PLACEHOLDER_PREFIX(org.opensearch.cluster.coordination.ClusterBootstrapService.BOOTSTRAP_PLACEHOLDER_PREFIX) Settings.builder(org.opensearch.common.settings.Settings.builder) MockTransport(org.opensearch.test.transport.MockTransport) Matchers.hasSize(org.hamcrest.Matchers.hasSize) Before(org.junit.Before) Collections.emptyMap(java.util.Collections.emptyMap) Matchers.greaterThanOrEqualTo(org.hamcrest.Matchers.greaterThanOrEqualTo) TransportRequest(org.opensearch.transport.TransportRequest) Collections.emptySet(java.util.Collections.emptySet) Collections.emptyList(java.util.Collections.emptyList) INITIAL_MASTER_NODES_SETTING(org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING) Matchers.allOf(org.hamcrest.Matchers.allOf) OpenSearchTestCase(org.opensearch.test.OpenSearchTestCase) DISCOVERY_SEED_PROVIDERS_SETTING(org.opensearch.discovery.DiscoveryModule.DISCOVERY_SEED_PROVIDERS_SETTING) Settings(org.opensearch.common.settings.Settings) UNCONFIGURED_BOOTSTRAP_TIMEOUT_SETTING(org.opensearch.cluster.coordination.ClusterBootstrapService.UNCONFIGURED_BOOTSTRAP_TIMEOUT_SETTING) DiscoveryNodeRole(org.opensearch.cluster.node.DiscoveryNodeRole) TransportService(org.opensearch.transport.TransportService) Collectors(java.util.stream.Collectors) DISCOVERY_SEED_HOSTS_SETTING(org.opensearch.discovery.SettingsBasedSeedHostsProvider.DISCOVERY_SEED_HOSTS_SETTING) Matchers.startsWith(org.hamcrest.Matchers.startsWith) AtomicLong(java.util.concurrent.atomic.AtomicLong) List(java.util.List) Stream(java.util.stream.Stream) NODE_NAME_SETTING(org.opensearch.node.Node.NODE_NAME_SETTING) Matchers.hasItem(org.hamcrest.Matchers.hasItem) Matchers.containsInAnyOrder(org.hamcrest.Matchers.containsInAnyOrder) Matchers.equalTo(org.hamcrest.Matchers.equalTo) Collections(java.util.Collections) Matchers.containsString(org.hamcrest.Matchers.containsString) DiscoveryModule(org.opensearch.discovery.DiscoveryModule) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) TransportRequest(org.opensearch.transport.TransportRequest) MockTransport(org.opensearch.test.transport.MockTransport) Matchers.containsString(org.hamcrest.Matchers.containsString) Before(org.junit.Before)

Example 2 with MockTransport

use of org.opensearch.test.transport.MockTransport in project OpenSearch by opensearch-project.

the class LeaderCheckerTests method testFollowerFailsImmediatelyOnHealthCheckFailure.

public void testFollowerFailsImmediatelyOnHealthCheckFailure() {
    final DiscoveryNode localNode = new DiscoveryNode("local-node", buildNewFakeTransportAddress(), Version.CURRENT);
    final DiscoveryNode leader = new DiscoveryNode("leader", buildNewFakeTransportAddress(), Version.CURRENT);
    final Response[] responseHolder = new Response[] { Response.SUCCESS };
    final Settings settings = Settings.builder().put(NODE_NAME_SETTING.getKey(), localNode.getId()).build();
    final DeterministicTaskQueue deterministicTaskQueue = new DeterministicTaskQueue(settings, random());
    final MockTransport mockTransport = new MockTransport() {

        @Override
        protected void onSendRequest(long requestId, String action, TransportRequest request, DiscoveryNode node) {
            if (action.equals(HANDSHAKE_ACTION_NAME)) {
                handleResponse(requestId, new TransportService.HandshakeResponse(node, ClusterName.DEFAULT, Version.CURRENT));
                return;
            }
            assertThat(action, equalTo(LEADER_CHECK_ACTION_NAME));
            assertEquals(node, leader);
            final Response response = responseHolder[0];
            deterministicTaskQueue.scheduleNow(new Runnable() {

                @Override
                public void run() {
                    switch(response) {
                        case SUCCESS:
                            handleResponse(requestId, Empty.INSTANCE);
                            break;
                        case REMOTE_ERROR:
                            handleRemoteError(requestId, new NodeHealthCheckFailureException("simulated error"));
                            break;
                    }
                }

                @Override
                public String toString() {
                    return response + " response to request " + requestId;
                }
            });
        }
    };
    final TransportService transportService = mockTransport.createTransportService(settings, deterministicTaskQueue.getThreadPool(), NOOP_TRANSPORT_INTERCEPTOR, boundTransportAddress -> localNode, null, emptySet());
    transportService.start();
    transportService.acceptIncomingRequests();
    final AtomicBoolean leaderFailed = new AtomicBoolean();
    final LeaderChecker leaderChecker = new LeaderChecker(settings, transportService, e -> {
        assertThat(e.getMessage(), endsWith("failed health checks"));
        assertTrue(leaderFailed.compareAndSet(false, true));
    }, () -> new StatusInfo(StatusInfo.Status.HEALTHY, "healthy-info"));
    leaderChecker.updateLeader(leader);
    {
        while (deterministicTaskQueue.getCurrentTimeMillis() < 10 * LEADER_CHECK_INTERVAL_SETTING.get(Settings.EMPTY).millis()) {
            deterministicTaskQueue.runAllRunnableTasks();
            deterministicTaskQueue.advanceTime();
        }
        deterministicTaskQueue.runAllRunnableTasks();
        assertFalse(leaderFailed.get());
        responseHolder[0] = Response.REMOTE_ERROR;
        deterministicTaskQueue.advanceTime();
        deterministicTaskQueue.runAllRunnableTasks();
        assertTrue(leaderFailed.get());
    }
}
Also used : DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) TransportRequest(org.opensearch.transport.TransportRequest) TransportResponse(org.opensearch.transport.TransportResponse) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TransportService(org.opensearch.transport.TransportService) StatusInfo(org.opensearch.monitor.StatusInfo) MockTransport(org.opensearch.test.transport.MockTransport) Settings(org.opensearch.common.settings.Settings)

Example 3 with MockTransport

use of org.opensearch.test.transport.MockTransport in project OpenSearch by opensearch-project.

the class LeaderCheckerTests method testFollowerFailsImmediatelyOnDisconnection.

public void testFollowerFailsImmediatelyOnDisconnection() {
    final DiscoveryNode localNode = new DiscoveryNode("local-node", buildNewFakeTransportAddress(), Version.CURRENT);
    final DiscoveryNode leader = new DiscoveryNode("leader", buildNewFakeTransportAddress(), Version.CURRENT);
    final Response[] responseHolder = new Response[] { Response.SUCCESS };
    final Settings settings = Settings.builder().put(NODE_NAME_SETTING.getKey(), localNode.getId()).build();
    final DeterministicTaskQueue deterministicTaskQueue = new DeterministicTaskQueue(settings, random());
    final MockTransport mockTransport = new MockTransport() {

        @Override
        protected void onSendRequest(long requestId, String action, TransportRequest request, DiscoveryNode node) {
            if (action.equals(HANDSHAKE_ACTION_NAME)) {
                handleResponse(requestId, new TransportService.HandshakeResponse(node, ClusterName.DEFAULT, Version.CURRENT));
                return;
            }
            assertThat(action, equalTo(LEADER_CHECK_ACTION_NAME));
            assertEquals(node, leader);
            final Response response = responseHolder[0];
            deterministicTaskQueue.scheduleNow(new Runnable() {

                @Override
                public void run() {
                    switch(response) {
                        case SUCCESS:
                            handleResponse(requestId, Empty.INSTANCE);
                            break;
                        case REMOTE_ERROR:
                            handleRemoteError(requestId, new ConnectTransportException(leader, "simulated error"));
                            break;
                        case DIRECT_ERROR:
                            handleError(requestId, new ConnectTransportException(leader, "simulated error"));
                    }
                }

                @Override
                public String toString() {
                    return response + " response to request " + requestId;
                }
            });
        }
    };
    final TransportService transportService = mockTransport.createTransportService(settings, deterministicTaskQueue.getThreadPool(), NOOP_TRANSPORT_INTERCEPTOR, boundTransportAddress -> localNode, null, emptySet());
    transportService.start();
    transportService.acceptIncomingRequests();
    final AtomicBoolean leaderFailed = new AtomicBoolean();
    final LeaderChecker leaderChecker = new LeaderChecker(settings, transportService, e -> {
        assertThat(e.getMessage(), anyOf(endsWith("disconnected"), endsWith("disconnected during check")));
        assertTrue(leaderFailed.compareAndSet(false, true));
    }, () -> new StatusInfo(StatusInfo.Status.HEALTHY, "healthy-info"));
    leaderChecker.updateLeader(leader);
    {
        while (deterministicTaskQueue.getCurrentTimeMillis() < 10 * LEADER_CHECK_INTERVAL_SETTING.get(Settings.EMPTY).millis()) {
            deterministicTaskQueue.runAllRunnableTasks();
            deterministicTaskQueue.advanceTime();
        }
        deterministicTaskQueue.runAllRunnableTasks();
        assertFalse(leaderFailed.get());
        responseHolder[0] = Response.REMOTE_ERROR;
        deterministicTaskQueue.advanceTime();
        deterministicTaskQueue.runAllRunnableTasks();
        assertTrue(leaderFailed.get());
    }
    leaderChecker.updateLeader(null);
    deterministicTaskQueue.runAllTasks();
    leaderFailed.set(false);
    responseHolder[0] = Response.SUCCESS;
    leaderChecker.updateLeader(leader);
    {
        while (deterministicTaskQueue.getCurrentTimeMillis() < 10 * LEADER_CHECK_INTERVAL_SETTING.get(Settings.EMPTY).millis()) {
            deterministicTaskQueue.runAllRunnableTasks();
            deterministicTaskQueue.advanceTime();
        }
        deterministicTaskQueue.runAllRunnableTasks();
        assertFalse(leaderFailed.get());
        responseHolder[0] = Response.DIRECT_ERROR;
        deterministicTaskQueue.advanceTime();
        deterministicTaskQueue.runAllRunnableTasks();
        assertTrue(leaderFailed.get());
    }
    deterministicTaskQueue.runAllTasks();
    leaderFailed.set(false);
    responseHolder[0] = Response.SUCCESS;
    leaderChecker.updateLeader(leader);
    {
        // need to connect first for disconnect to have any effect
        transportService.connectToNode(leader);
        transportService.disconnectFromNode(leader);
        deterministicTaskQueue.runAllRunnableTasks();
        assertTrue(leaderFailed.get());
    }
}
Also used : DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) TransportRequest(org.opensearch.transport.TransportRequest) TransportResponse(org.opensearch.transport.TransportResponse) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TransportService(org.opensearch.transport.TransportService) ConnectTransportException(org.opensearch.transport.ConnectTransportException) StatusInfo(org.opensearch.monitor.StatusInfo) MockTransport(org.opensearch.test.transport.MockTransport) Settings(org.opensearch.common.settings.Settings)

Example 4 with MockTransport

use of org.opensearch.test.transport.MockTransport in project OpenSearch by opensearch-project.

the class PreVoteCollectorTests method createObjects.

@Before
public void createObjects() {
    Settings settings = Settings.builder().put(NODE_NAME_SETTING.getKey(), "node").build();
    deterministicTaskQueue = new DeterministicTaskQueue(settings, random());
    final MockTransport mockTransport = new MockTransport() {

        @Override
        protected void onSendRequest(final long requestId, final String action, final TransportRequest request, final DiscoveryNode node) {
            super.onSendRequest(requestId, action, request, node);
            assertThat(action, is(REQUEST_PRE_VOTE_ACTION_NAME));
            assertThat(request, instanceOf(PreVoteRequest.class));
            assertThat(node, not(equalTo(localNode)));
            PreVoteRequest preVoteRequest = (PreVoteRequest) request;
            assertThat(preVoteRequest.getSourceNode(), equalTo(localNode));
            deterministicTaskQueue.scheduleNow(new Runnable() {

                @Override
                public void run() {
                    final PreVoteResponse response = responsesByNode.get(node);
                    if (response == null) {
                        handleRemoteError(requestId, new ConnectTransportException(node, "no response"));
                    } else {
                        handleResponse(requestId, response);
                    }
                }

                @Override
                public String toString() {
                    return "response to " + request + " from " + node;
                }
            });
        }

        @Override
        public void handleRemoteError(long requestId, Throwable t) {
            logger.warn("Remote error", t);
        }
    };
    lastAcceptedTerm = randomNonNegativeLong();
    currentTerm = randomLongBetween(lastAcceptedTerm, Long.MAX_VALUE);
    lastAcceptedVersion = randomNonNegativeLong();
    localNode = new DiscoveryNode("local-node", buildNewFakeTransportAddress(), Version.CURRENT);
    responsesByNode.put(localNode, new PreVoteResponse(currentTerm, lastAcceptedTerm, lastAcceptedVersion));
    healthStatus = new StatusInfo(HEALTHY, "healthy-info");
    transportService = mockTransport.createTransportService(settings, deterministicTaskQueue.getThreadPool(), TransportService.NOOP_TRANSPORT_INTERCEPTOR, boundTransportAddress -> localNode, null, emptySet());
    transportService.start();
    transportService.acceptIncomingRequests();
    preVoteCollector = new PreVoteCollector(transportService, () -> {
        assert electionOccurred == false;
        electionOccurred = true;
    }, l -> {
    }, ElectionStrategy.DEFAULT_INSTANCE, () -> healthStatus);
    preVoteCollector.update(getLocalPreVoteResponse(), null);
}
Also used : Matchers.not(org.hamcrest.Matchers.not) Version(org.opensearch.Version) HashMap(java.util.HashMap) Releasable(org.opensearch.common.lease.Releasable) AtomicReference(java.util.concurrent.atomic.AtomicReference) HashSet(java.util.HashSet) ClusterState(org.opensearch.cluster.ClusterState) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) MockTransport(org.opensearch.test.transport.MockTransport) Map(java.util.Map) Matchers.nullValue(org.hamcrest.Matchers.nullValue) Before(org.junit.Before) UNHEALTHY(org.opensearch.monitor.StatusInfo.Status.UNHEALTHY) StreamInput(org.opensearch.common.io.stream.StreamInput) VotingConfiguration(org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration) TransportRequest(org.opensearch.transport.TransportRequest) Collections.emptySet(java.util.Collections.emptySet) OpenSearchTestCase(org.opensearch.test.OpenSearchTestCase) RemoteTransportException(org.opensearch.transport.RemoteTransportException) TransportResponseHandler(org.opensearch.transport.TransportResponseHandler) Set(java.util.Set) HEALTHY(org.opensearch.monitor.StatusInfo.Status.HEALTHY) Settings(org.opensearch.common.settings.Settings) IOException(java.io.IOException) TransportService(org.opensearch.transport.TransportService) Objects(java.util.Objects) Matchers.instanceOf(org.hamcrest.Matchers.instanceOf) SAME(org.opensearch.threadpool.ThreadPool.Names.SAME) NODE_NAME_SETTING(org.opensearch.node.Node.NODE_NAME_SETTING) Matchers.equalTo(org.hamcrest.Matchers.equalTo) REQUEST_PRE_VOTE_ACTION_NAME(org.opensearch.cluster.coordination.PreVoteCollector.REQUEST_PRE_VOTE_ACTION_NAME) StatusInfo(org.opensearch.monitor.StatusInfo) ConnectTransportException(org.opensearch.transport.ConnectTransportException) Matchers.is(org.hamcrest.Matchers.is) TransportException(org.opensearch.transport.TransportException) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) TransportRequest(org.opensearch.transport.TransportRequest) ConnectTransportException(org.opensearch.transport.ConnectTransportException) StatusInfo(org.opensearch.monitor.StatusInfo) MockTransport(org.opensearch.test.transport.MockTransport) Settings(org.opensearch.common.settings.Settings) Before(org.junit.Before)

Example 5 with MockTransport

use of org.opensearch.test.transport.MockTransport in project OpenSearch by opensearch-project.

the class FollowersCheckerTests method testResponder.

public void testResponder() {
    final DiscoveryNode leader = new DiscoveryNode("leader", buildNewFakeTransportAddress(), Version.CURRENT);
    final DiscoveryNode follower = new DiscoveryNode("follower", buildNewFakeTransportAddress(), Version.CURRENT);
    final Settings settings = Settings.builder().put(NODE_NAME_SETTING.getKey(), follower.getName()).build();
    final DeterministicTaskQueue deterministicTaskQueue = new DeterministicTaskQueue(settings, random());
    final MockTransport mockTransport = new MockTransport() {

        @Override
        protected void onSendRequest(long requestId, String action, TransportRequest request, DiscoveryNode node) {
            throw new AssertionError("no requests expected");
        }
    };
    final TransportService transportService = mockTransport.createTransportService(settings, deterministicTaskQueue.getThreadPool(), TransportService.NOOP_TRANSPORT_INTERCEPTOR, boundTransportAddress -> follower, null, emptySet());
    transportService.start();
    transportService.acceptIncomingRequests();
    final AtomicBoolean calledCoordinator = new AtomicBoolean();
    final AtomicReference<RuntimeException> coordinatorException = new AtomicReference<>();
    final FollowersChecker followersChecker = new FollowersChecker(settings, transportService, fcr -> {
        assertTrue(calledCoordinator.compareAndSet(false, true));
        final RuntimeException exception = coordinatorException.get();
        if (exception != null) {
            throw exception;
        }
    }, (node, reason) -> {
        assert false : node;
    }, () -> new StatusInfo(HEALTHY, "healthy-info"));
    {
        // Does not call into the coordinator in the normal case
        final long term = randomNonNegativeLong();
        followersChecker.updateFastResponseState(term, Mode.FOLLOWER);
        final ExpectsSuccess expectsSuccess = new ExpectsSuccess();
        transportService.sendRequest(follower, FOLLOWER_CHECK_ACTION_NAME, new FollowerCheckRequest(term, leader), expectsSuccess);
        deterministicTaskQueue.runAllTasks();
        assertTrue(expectsSuccess.succeeded());
        assertFalse(calledCoordinator.get());
    }
    {
        // Does not call into the coordinator for a term that's too low, just rejects immediately
        final long leaderTerm = randomLongBetween(1, Long.MAX_VALUE - 1);
        final long followerTerm = randomLongBetween(leaderTerm + 1, Long.MAX_VALUE);
        followersChecker.updateFastResponseState(followerTerm, Mode.FOLLOWER);
        final AtomicReference<TransportException> receivedException = new AtomicReference<>();
        transportService.sendRequest(follower, FOLLOWER_CHECK_ACTION_NAME, new FollowerCheckRequest(leaderTerm, leader), new TransportResponseHandler<TransportResponse.Empty>() {

            @Override
            public TransportResponse.Empty read(StreamInput in) {
                return TransportResponse.Empty.INSTANCE;
            }

            @Override
            public void handleResponse(TransportResponse.Empty response) {
                fail("unexpected success");
            }

            @Override
            public void handleException(TransportException exp) {
                assertThat(exp, not(nullValue()));
                assertTrue(receivedException.compareAndSet(null, exp));
            }

            @Override
            public String executor() {
                return Names.SAME;
            }
        });
        deterministicTaskQueue.runAllTasks();
        assertFalse(calledCoordinator.get());
        assertThat(receivedException.get(), not(nullValue()));
    }
    {
        // Calls into the coordinator if the term needs bumping
        final long leaderTerm = randomLongBetween(2, Long.MAX_VALUE);
        final long followerTerm = randomLongBetween(1, leaderTerm - 1);
        followersChecker.updateFastResponseState(followerTerm, Mode.FOLLOWER);
        final ExpectsSuccess expectsSuccess = new ExpectsSuccess();
        transportService.sendRequest(follower, FOLLOWER_CHECK_ACTION_NAME, new FollowerCheckRequest(leaderTerm, leader), expectsSuccess);
        deterministicTaskQueue.runAllTasks();
        assertTrue(expectsSuccess.succeeded());
        assertTrue(calledCoordinator.get());
        calledCoordinator.set(false);
    }
    {
        // Calls into the coordinator if not a follower
        final long term = randomNonNegativeLong();
        followersChecker.updateFastResponseState(term, randomFrom(Mode.LEADER, Mode.CANDIDATE));
        final ExpectsSuccess expectsSuccess = new ExpectsSuccess();
        transportService.sendRequest(follower, FOLLOWER_CHECK_ACTION_NAME, new FollowerCheckRequest(term, leader), expectsSuccess);
        deterministicTaskQueue.runAllTasks();
        assertTrue(expectsSuccess.succeeded());
        assertTrue(calledCoordinator.get());
        calledCoordinator.set(false);
    }
    {
        // If it calls into the coordinator and the coordinator throws an exception then it's passed back to the caller
        final long term = randomNonNegativeLong();
        followersChecker.updateFastResponseState(term, randomFrom(Mode.LEADER, Mode.CANDIDATE));
        final String exceptionMessage = "test simulated exception " + randomNonNegativeLong();
        coordinatorException.set(new OpenSearchException(exceptionMessage));
        final AtomicReference<TransportException> receivedException = new AtomicReference<>();
        transportService.sendRequest(follower, FOLLOWER_CHECK_ACTION_NAME, new FollowerCheckRequest(term, leader), new TransportResponseHandler<TransportResponse.Empty>() {

            @Override
            public TransportResponse.Empty read(StreamInput in) {
                return TransportResponse.Empty.INSTANCE;
            }

            @Override
            public void handleResponse(TransportResponse.Empty response) {
                fail("unexpected success");
            }

            @Override
            public void handleException(TransportException exp) {
                assertThat(exp, not(nullValue()));
                assertTrue(receivedException.compareAndSet(null, exp));
            }

            @Override
            public String executor() {
                return Names.SAME;
            }
        });
        deterministicTaskQueue.runAllTasks();
        assertTrue(calledCoordinator.get());
        assertThat(receivedException.get(), not(nullValue()));
        assertThat(receivedException.get().getRootCause().getMessage(), equalTo(exceptionMessage));
    }
}
Also used : DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) TransportRequest(org.opensearch.transport.TransportRequest) TransportResponseHandler(org.opensearch.transport.TransportResponseHandler) AtomicReference(java.util.concurrent.atomic.AtomicReference) FollowerCheckRequest(org.opensearch.cluster.coordination.FollowersChecker.FollowerCheckRequest) TransportResponse(org.opensearch.transport.TransportResponse) ConnectTransportException(org.opensearch.transport.ConnectTransportException) TransportException(org.opensearch.transport.TransportException) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Empty(org.opensearch.transport.TransportResponse.Empty) TransportService(org.opensearch.transport.TransportService) StatusInfo(org.opensearch.monitor.StatusInfo) MockTransport(org.opensearch.test.transport.MockTransport) StreamInput(org.opensearch.common.io.stream.StreamInput) OpenSearchException(org.opensearch.OpenSearchException) Settings(org.opensearch.common.settings.Settings)

Aggregations

DiscoveryNode (org.opensearch.cluster.node.DiscoveryNode)16 Settings (org.opensearch.common.settings.Settings)16 MockTransport (org.opensearch.test.transport.MockTransport)16 TransportService (org.opensearch.transport.TransportService)15 TransportRequest (org.opensearch.transport.TransportRequest)12 StatusInfo (org.opensearch.monitor.StatusInfo)9 TransportException (org.opensearch.transport.TransportException)9 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)8 Version (org.opensearch.Version)8 StreamInput (org.opensearch.common.io.stream.StreamInput)7 OpenSearchTestCase (org.opensearch.test.OpenSearchTestCase)7 Collections.emptySet (java.util.Collections.emptySet)6 Matchers.equalTo (org.hamcrest.Matchers.equalTo)6 Before (org.junit.Before)6 ConnectTransportException (org.opensearch.transport.ConnectTransportException)6 Collections.emptyMap (java.util.Collections.emptyMap)5 OpenSearchException (org.opensearch.OpenSearchException)5 ClusterName (org.opensearch.cluster.ClusterName)5 ClusterState (org.opensearch.cluster.ClusterState)5 ThreadPool (org.opensearch.threadpool.ThreadPool)5