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

Implement gRPC tester in Rust #28

Merged
merged 4 commits into from
Dec 28, 2023
Merged

Conversation

Fluxie
Copy link
Collaborator

@Fluxie Fluxie commented Dec 16, 2023

The tester consists of three parts: grpc-tester, grpc-generator and grpc-server. Tester is a library which enables units tests to start and stop the testing framework. The generator sends messages to server and server will collect statistics of the messages it receives.

This initial implementation does not allow injecting the proxide proxy between the grpc-generator and grpc-server. This functionality will be added in another pull request.

grpc-tester

The tester is a Rust library with an interface for starting and tying the generator and server together. During the startup it ensures the connection between the generator and the server is ready before returning the tester to ensure unit tests utilizing the tester won't experience random timing related failures.

Both the generator and the server are started in their own tokio runtimes to isolate the runtime used for testing. The threads associated with the generator and the server have named threads so that they can be distinguished in the debugger.

grpc-generator

The generator periodically sends gRPC requests (SendMessage) to the server. The purpose of the generator is to provide a constant stream of message that can be observed with the proxide proxy.

grpc-server

The server's main purpose is to receive and then ignore the messages it receives.

A support for retrieving statistics of the received messages will be added in the future.

@Fluxie Fluxie changed the title Implementes gRPC tester in Rust Implements gRPC tester in Rust Dec 16, 2023
@Fluxie Fluxie changed the title Implements gRPC tester in Rust Implement gRPC tester in Rust Dec 16, 2023
@Fluxie Fluxie force-pushed the topic/rust-grpc branch 2 times, most recently from ad8f5d1 to b87e85f Compare December 17, 2023 10:24
The tester consists of three parts: grpc-tester, grpc-generator and grpc-server. Tester is a library which enables units tests to start and stop the testing framework. The generator sends messages to server and server will collect statistics of the messages it receives.

This initial implementation does not allow injecting the proxide proxy between the grpc-generator and grpc-server. This functionality will be added in another pull request.

#### grpc-tester

The tester is a Rust library with an interface for starting and tying the generator and server together. During the startup it ensures the connection between the generator and the server are ready before returning the tester to ensure unit tests utilizing the tester won't experience random timing related failures.

Both the generator and the server are started in their own tokio runtimes to isolate the runtime used for testing. The threads associated with the generator and the server have named threads so that they can be distinguished in the debugger.

#### grpc-generator

The generator periodically sends gRPC requests (SendMessage) to the server. The purpose of the generator is to provide a constant stream of message that can be observed with the proxide proxy.

#### grpc-server

The server's main purpose is to receive and then ignore the messages it receives.

A support for retrieving statistics of the received messages will be added in the future.
@Fluxie Fluxie marked this pull request as ready for review December 19, 2023 14:56
@Fluxie Fluxie merged commit 206db1d into Rantanen:master Dec 28, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant