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

Allow repeated future outcomes in mocked gRPCs #88

Merged
merged 4 commits into from
Feb 28, 2024

Conversation

mhidalgo-bdai
Copy link
Collaborator

@mhidalgo-bdai mhidalgo-bdai commented Feb 22, 2024

Follow-up to #81. This patch should make it easier to work with blocking calls that invoke many gRPCs.

Now, in addition to future.returns() and future.fails(), you can invoke future.returns().repeatedly(N) and future.fails().repeatedly(N) to repeat the same outcome a finite number of times and future.returns().forever() and future.fails().forever() to repeat the same outcome indefinitely.

Signed-off-by: Michel Hidalgo <mhidalgo@theaiinstitute.com>
@mhidalgo-bdai
Copy link
Collaborator Author

Putting it out for you to try @jbarry-bdai. I'll add more tests and update the wiki later.

Copy link
Collaborator

@jbarry-bdai jbarry-bdai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't look at the code but like the API!

mhidalgo-bdai and others added 3 commits February 28, 2024 11:50
Signed-off-by: Michel Hidalgo <mhidalgo@theaiinstitute.com>
Signed-off-by: Michel Hidalgo <mhidalgo@theaiinstitute.com>
@mhidalgo-bdai
Copy link
Collaborator Author

OK, this is ready to go @amessing-bdai.

@amessing-bdai amessing-bdai merged commit 74c37d4 into main Feb 28, 2024
4 checks passed
@amessing-bdai amessing-bdai deleted the mhidalgo-bdai/repeat-futures-outcomes branch February 28, 2024 15:51
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