-
Notifications
You must be signed in to change notification settings - Fork 44
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
Fix streaming service resolution and header passing #291
Conversation
When there is a context, the previous logic does not check for the stream type and it just return a record. Thus, it leads to a incorrect service resolution. Here, it added the check.
- Inject headers to the message itself - Client streaming headers pass to the client through streaming connection - Bidirectional streaming headers pass to the client through streaming iterator
To easily execute sub-tests.
Codecov Report
@@ Coverage Diff @@
## master #291 +/- ##
============================================
+ Coverage 74.52% 74.60% +0.08%
- Complexity 1062 1072 +10
============================================
Files 121 121
Lines 6280 6313 +33
Branches 1083 1090 +7
============================================
+ Hits 4680 4710 +30
+ Misses 1175 1174 -1
- Partials 425 429 +4
Continue to review full report at Codecov.
|
Otherwise it will break the previous stub generations.
grpc-native/src/main/java/org/ballerinalang/net/grpc/ServerCall.java
Outdated
Show resolved
Hide resolved
@BuddhiWathsala There are some commented codes as well. please check |
These commented ones are intentional. gRPC has generated codes that are repeatedly use across multiple tests. We maintain these codes as comment for the sake of completeness. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Let's add another test case to return ContextMessage on the server-side without using a caller object later |
We already have a similar test for server streaming. I'll add similar tests for client and bidirectional. |
Purpose
Fixes ballerina-platform/ballerina-library#1504
Fixes ballerina-platform/ballerina-library#1458
Examples
Checklist