Fixup after merge
This commit is contained in:
parent
f317562c82
commit
f6891cd222
|
@ -182,15 +182,7 @@ public class PeerFinderTests extends ESTestCase {
|
|||
|
||||
@Before
|
||||
public void setup() {
|
||||
capturingTransport = new CapturingTransport() {
|
||||
@Override
|
||||
public boolean nodeConnected(DiscoveryNode node) {
|
||||
final boolean isConnected = connectedNodes.contains(node);
|
||||
final boolean isDisconnected = disconnectedNodes.contains(node);
|
||||
assert isConnected != isDisconnected : node + ": isConnected=" + isConnected + ", isDisconnected=" + isDisconnected;
|
||||
return isConnected;
|
||||
}
|
||||
};
|
||||
capturingTransport = new CapturingTransport();
|
||||
transportAddressConnector = new MockTransportAddressConnector();
|
||||
providedAddresses = new ArrayList<>();
|
||||
addressResolveDelay = 0L;
|
||||
|
@ -201,7 +193,17 @@ public class PeerFinderTests extends ESTestCase {
|
|||
localNode = newDiscoveryNode("local-node");
|
||||
transportService = new TransportService(settings, capturingTransport,
|
||||
deterministicTaskQueue.getThreadPool(), TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||
boundTransportAddress -> localNode, null, emptySet());
|
||||
boundTransportAddress -> localNode, null, emptySet()) {
|
||||
|
||||
@Override
|
||||
public boolean nodeConnected(DiscoveryNode node) {
|
||||
final boolean isConnected = connectedNodes.contains(node);
|
||||
final boolean isDisconnected = disconnectedNodes.contains(node);
|
||||
assert isConnected != isDisconnected : node + ": isConnected=" + isConnected + ", isDisconnected=" + isDisconnected;
|
||||
return isConnected;
|
||||
}
|
||||
};
|
||||
|
||||
transportService.start();
|
||||
transportService.acceptIncomingRequests();
|
||||
|
||||
|
|
|
@ -106,8 +106,7 @@ public class CapturingTransport implements Transport {
|
|||
@Override
|
||||
public void sendRequest(long requestId, String action, TransportRequest request, TransportRequestOptions options)
|
||||
throws TransportException {
|
||||
requests.put(requestId, Tuple.tuple(discoveryNode, action));
|
||||
capturedRequests.add(new CapturedRequest(discoveryNode, requestId, action, request));
|
||||
onSendRequest(requestId, action, request, discoveryNode);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue