Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MockTcpTransport to connect asynchronously (#28203) #33476

Merged
merged 2 commits into from
Sep 6, 2018

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