Skip to content

Commit

Permalink
spotlessApply
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Jan 2, 2024
1 parent c773bf0 commit 6f87b99
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.transport.RemoteClusterConnectionTests;
import org.opensearch.transport.Transport;
import org.junit.Before;
import org.opensearch.transport.TransportService;
import org.junit.Before;

import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -268,19 +268,14 @@ public void testDeleteAllPITSuccessWhenNoPITsExist() throws InterruptedException
ActionFilters actionFilters = mock(ActionFilters.class);
when(actionFilters.filters()).thenReturn(new ActionFilter[0]);
List<DiscoveryNode> knownNodes = new CopyOnWriteArrayList<>();
try (
MockTransportService cluster1Transport = startTransport("cluster_1_node", knownNodes, Version.CURRENT)
) {
try (MockTransportService cluster1Transport = startTransport("cluster_1_node", knownNodes, Version.CURRENT)) {
knownNodes.add(cluster1Transport.getLocalDiscoNode());
TransportService mockTransportService = mock(TransportService.class);
PitService pitService = new PitService(clusterServiceMock, mock(SearchTransportService.class), mockTransportService, client) {
@Override
public void getAllPits(ActionListener<GetAllPitNodesResponse> getAllPitsListener) {
List<ListPitInfo> list = new ArrayList<>();
GetAllPitNodeResponse getAllPitNodeResponse = new GetAllPitNodeResponse(
cluster1Transport.getLocalDiscoNode(),
list
);
GetAllPitNodeResponse getAllPitNodeResponse = new GetAllPitNodeResponse(cluster1Transport.getLocalDiscoNode(), list);
List<GetAllPitNodeResponse> nodeList = new ArrayList();
nodeList.add(getAllPitNodeResponse);
getAllPitsListener.onResponse(new GetAllPitNodesResponse(new ClusterName("cn"), nodeList, new ArrayList()));
Expand Down

0 comments on commit 6f87b99

Please sign in to comment.