Copilot commented on code in PR #3149:
URL: https://github.com/apache/dubbo-go/pull/3149#discussion_r2649040776


##########
protocol/triple/triple_protocol/triple_ext_test.go:
##########
@@ -1654,6 +1654,22 @@ func TestStreamForServer(t *testing.T) {
                assert.NotNil(t, res)
                assert.Equal(t, msg.Sum, int64(1))
        })
+       t.Run("client-stream-conn", func(t *testing.T) {
+               t.Parallel()
+               client, server := newPingServer(&pluggablePingServer{
+                       sum: func(ctx context.Context, stream 
*triple.ClientStream) (*triple.Response, error) {
+                               assert.NotNil(t, 
stream.Conn().Send("not-proto"))
+                               return 
triple.NewResponse(&pingv1.SumResponse{}), nil

Review Comment:
   The test asserts that `stream.Conn().Send("not-proto")` returns an error 
(NotNil), but doesn't propagate this error to the client or verify its impact. 
Compare with the "not-proto-message" test at line 1519-1537, which returns the 
error from Send and then verifies that the client receives an appropriate 
error. This test should either return the error or verify what happens on the 
client side when the server attempts to send invalid data. As written, the test 
asserts an error occurs but then ignores it, which doesn't fully validate the 
error handling behavior.



-- 
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