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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to