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


##########
protocol/triple/triple_protocol/triple_ext_test.go:
##########
@@ -1681,7 +1681,10 @@ func TestStreamForServer(t *testing.T) {
                assert.Nil(t, stream.Send(&pingv1.SumRequest{Number: 1}))
                res := triple.NewResponse(&pingv1.SumResponse{})
                err = stream.CloseAndReceive(res)
-               assert.Nil(t, err)
+               if err != nil {
+                       assert.Equal(t, triple.CodeUnknown, triple.CodeOf(err))
+                       assert.True(t, strings.Contains(err.Error(), "write 
envelope"))

Review Comment:
   `assert.Equal` in this repo uses the signature `Equal(tb, got, want ...)` 
(see internal/assert). Here the arguments are reversed, which makes failures 
harder to read and is inconsistent with the surrounding tests (e.g., the next 
subtest uses `assert.Equal(t, triple.CodeOf(err), triple.CodeUnknown)`).



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