Skip to content

Conversation

@Tim-Brooks
Copy link
Contributor

The method initiateChannel on TcpTransport is explicit in that
channels can be connect asynchronously. All production implementations
do connect asynchronously. Only the blocking MockTcpTransport
connects in a synchronous manner. This avoids testing some of the
blocking code in TcpTransport that waits on connections to complete.
Additionally, it requires a more extensive method signature than
required for other transports.

This commit modifies the MockTcpTransport to make these connections
asynchronously on a different thread. Additionally, it simplifies that
initiateChannel method signature.

The method `initiateChannel` on `TcpTransport` is explicit in that
channels can be connect asynchronously. All production implementations
do connect asynchronously. Only the blocking `MockTcpTransport`
connects in a synchronous manner. This avoids testing some of the
blocking code in `TcpTransport` that waits on connections to complete.
Additionally, it requires a more extensive method signature than
required for other transports.

This commit modifies the `MockTcpTransport` to make these connections
asynchronously on a different thread. Additionally, it simplifies that
`initiateChannel` method signature.
@Tim-Brooks Tim-Brooks added :Distributed Coordination/Network Http and internode communication implementations v6.5.0 labels Sep 6, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@Tim-Brooks
Copy link
Contributor Author

This is just a backport.

@Tim-Brooks Tim-Brooks merged commit 15efb2b into elastic:6.x Sep 6, 2018
@Tim-Brooks Tim-Brooks deleted the backport_connect_sig_change branch December 18, 2019 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Coordination/Network Http and internode communication implementations >non-issue v6.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants