mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Fix formatting in channel close test
This commit fixes the indentation in the transport test case for a channel closing while connecting.
This commit is contained in:
parent
4c06b8f1d2
commit
393e73612e
@ -2616,28 +2616,28 @@ public abstract class AbstractSimpleTransportTestCase extends ESTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testChannelCloseWhileConnecting() throws IOException {
|
public void testChannelCloseWhileConnecting() throws IOException {
|
||||||
try (MockTransportService service = build(Settings.builder().put("name", "close").build(), version0, null, true)) {
|
try (MockTransportService service = build(Settings.builder().put("name", "close").build(), version0, null, true)) {
|
||||||
service.setExecutorName(ThreadPool.Names.SAME); // make sure stuff is executed in a blocking fashion
|
service.setExecutorName(ThreadPool.Names.SAME); // make sure stuff is executed in a blocking fashion
|
||||||
service.addConnectionListener(new TransportConnectionListener() {
|
service.addConnectionListener(new TransportConnectionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onConnectionOpened(final Transport.Connection connection) {
|
public void onConnectionOpened(final Transport.Connection connection) {
|
||||||
try {
|
try {
|
||||||
closeConnectionChannel(service.getOriginalTransport(), connection);
|
closeConnectionChannel(service.getOriginalTransport(), connection);
|
||||||
} catch (final IOException e) {
|
} catch (final IOException e) {
|
||||||
throw new AssertionError(e);
|
throw new AssertionError(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
final ConnectionProfile.Builder builder = new ConnectionProfile.Builder();
|
final ConnectionProfile.Builder builder = new ConnectionProfile.Builder();
|
||||||
builder.addConnections(1,
|
builder.addConnections(1,
|
||||||
TransportRequestOptions.Type.BULK,
|
TransportRequestOptions.Type.BULK,
|
||||||
TransportRequestOptions.Type.PING,
|
TransportRequestOptions.Type.PING,
|
||||||
TransportRequestOptions.Type.RECOVERY,
|
TransportRequestOptions.Type.RECOVERY,
|
||||||
TransportRequestOptions.Type.REG,
|
TransportRequestOptions.Type.REG,
|
||||||
TransportRequestOptions.Type.STATE);
|
TransportRequestOptions.Type.STATE);
|
||||||
final ConnectTransportException e =
|
final ConnectTransportException e =
|
||||||
expectThrows(ConnectTransportException.class, () -> service.openConnection(nodeA, builder.build()));
|
expectThrows(ConnectTransportException.class, () -> service.openConnection(nodeA, builder.build()));
|
||||||
assertThat(e, hasToString(containsString(("a channel closed while connecting"))));
|
assertThat(e, hasToString(containsString(("a channel closed while connecting"))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user