Skip to content

Conversation

@beandrad
Copy link

@beandrad beandrad commented May 4, 2021

This PR has two commits:

This allows to use an overridden `stop()` method when the Locust
runner stops the user, which allows for more flexibility without
introducing additional complexity.

One of the use cases is being able to close a gRPC channel before
killing the user greenlet.
@beandrad beandrad force-pushed the ia.grpc-example branch 3 times, most recently from 3822a9a to 2bc1f81 Compare May 4, 2021 16:39
@cyberw
Copy link
Collaborator

cyberw commented May 5, 2021

Looks good! Just auto-format the files using Black and I can merge.

Due to two main reason: (1) grpcio needs to be "patched" to use `gevent`
and (2) the existing patch has a bug (see
(grpc#15880)[grpc/grpc#15880]) implementing
gRPC load tests using Locust is not immediately obvious.

This example showcases how to implement a simple load test against
a gPRC server making sure that the requests are asynchronous.
@beandrad beandrad force-pushed the ia.grpc-example branch from 2bc1f81 to 9b30cc4 Compare May 5, 2021 08:01
@cyberw cyberw merged commit ac88fdc into locustio:master May 5, 2021
@cyberw
Copy link
Collaborator

cyberw commented May 5, 2021

thanks!

@Liuyanzhi
Copy link

@beandrad Please ask weather support grpc BidirectStrem interface? I used Generator to grpc stream method, but the test case was stuck

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.

3 participants