Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improve AllureGrpc integartion for support non-blocking (streaming) stubs #1015

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
Loading
from

Conversation

dtuchs
Copy link

@dtuchs dtuchs commented Mar 2, 2024

Context

In gRPC, client streaming and bidirectional streaming require to use a non-blocking (async) Stubs. These stubs uses different threads for handling sendMessage(T message) and onClose(status, trailers) events. Typically, it's not possible to create and commit a single Allure step within these methods, as AllureThreadContext internally uses ThreadLocal. However, it's possible to achieve this in a separate daemon thread.

Due to the asynchronous implementation of non-blocking stubs, we cannot guarantee that the Allure daemon thread committing the step will terminate immediately upon the completion of the non-blocking stub call. Therefore, for such non-blocking calls, it will be necessary to execute AllureGrpc.await() method after each test.

This approach is explained in the README and javadocs.

There is example report for bidirectional calls:
Screenshot 2024-03-02 at 22 32 33

Checklist

@dtuchs dtuchs mentioned this pull request Mar 2, 2024
2 tasks
@dtuchs
Copy link
Author

dtuchs commented Mar 2, 2024

Also bug #973 should be fixed.

@dtuchs dtuchs marked this pull request as draft March 4, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.