You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "Similarityoung (via GitHub)" <gi...@apache.org> on 2026/01/02 06:10:14 UTC
[PR] test: enhance triple stream validation in unit tests [dubbo-go]
Similarityoung opened a new pull request, #3152:
URL: https://github.com/apache/dubbo-go/pull/3152
### Description
Fixes #3149
This pull request makes a minor improvement to the `TestStreamForServer` test by ensuring that the client stream is properly established before attempting to send a non-protobuf message. This helps verify the correct behavior of the stream handling logic.
- **Test robustness improvement:**
* In `triple_ext_test.go`, the test now explicitly receives the client's message before sending a non-proto message, ensuring the stream is established and making the test more reliable.
### Checklist
- [x] I confirm the target branch is `develop`
- [x] Code has passed local testing
- [x] I have added tests that prove my fix is effective or that my feature works
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] test: enhance triple stream validation in unit tests [dubbo-go]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks merged PR #3152:
URL: https://github.com/apache/dubbo-go/pull/3152
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] test: enhance triple stream validation in unit tests [dubbo-go]
Posted by "nanjiek (via GitHub)" <gi...@apache.org>.
nanjiek commented on PR #3152:
URL: https://github.com/apache/dubbo-go/pull/3152#issuecomment-3728209441
LGTM
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] test: enhance triple stream validation in unit tests [dubbo-go]
Posted by "Similarityoung (via GitHub)" <gi...@apache.org>.
Similarityoung commented on code in PR #3152:
URL: https://github.com/apache/dubbo-go/pull/3152#discussion_r2657573476
##########
protocol/triple/triple_protocol/triple_ext_test.go:
##########
@@ -1658,6 +1658,9 @@ func TestStreamForServer(t *testing.T) {
t.Parallel()
client, server := newPingServer(&pluggablePingServer{
sum: func(ctx context.Context, stream *triple.ClientStream) (*triple.Response, error) {
+ // First receive the client's message to ensure the stream is established
+ assert.True(t, stream.Receive(&pingv1.SumRequest{}))
Review Comment:
no need
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] test: enhance triple stream validation in unit tests [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3152:
URL: https://github.com/apache/dubbo-go/pull/3152#issuecomment-3704549090
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3152) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3152&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3152&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3152&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3152&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3152&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3152)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] test: enhance triple stream validation in unit tests [dubbo-go]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3152:
URL: https://github.com/apache/dubbo-go/pull/3152#issuecomment-3704567994
## [Codecov](https://app.codecov.io/gh/apache/dubbo-go/pull/3152?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 47.80%. Comparing base ([`489ee6a`](https://app.codecov.io/gh/apache/dubbo-go/commit/489ee6aed49b9a08cd0fb63232a4eaec5fce6e1a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7ee3eb8`](https://app.codecov.io/gh/apache/dubbo-go/commit/7ee3eb8366c8e46af69b4a6f3cfddf52d780e3a8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## develop #3152 +/- ##
========================================
Coverage 47.80% 47.80%
========================================
Files 460 460
Lines 33011 33011
========================================
Hits 15782 15782
+ Misses 15963 15962 -1
- Partials 1266 1267 +1
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/dubbo-go/pull/3152?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] test: enhance triple stream validation in unit tests [dubbo-go]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #3152:
URL: https://github.com/apache/dubbo-go/pull/3152#discussion_r2657443860
##########
protocol/triple/triple_protocol/triple_ext_test.go:
##########
@@ -1658,6 +1658,9 @@ func TestStreamForServer(t *testing.T) {
t.Parallel()
client, server := newPingServer(&pluggablePingServer{
sum: func(ctx context.Context, stream *triple.ClientStream) (*triple.Response, error) {
+ // First receive the client's message to ensure the stream is established
+ assert.True(t, stream.Receive(&pingv1.SumRequest{}))
Review Comment:
The "client-stream-send-msg" test case below (starting at line 1676) follows a similar pattern to this test - it also calls `stream.Conn().Send()` on the server side without first receiving the client's message. For consistency and the same robustness reasons mentioned in the PR description, consider adding the same `stream.Receive()` call at the beginning of that test's handler function (after line 1679).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org