You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "damondouglas (via GitHub)" <gi...@apache.org> on 2023/02/08 16:55:47 UTC

[GitHub] [beam] damondouglas commented on a diff in pull request #25379: [Playground] Fix Test_getRunOrTestCmd on Go 1.20

damondouglas commented on code in PR #25379:
URL: https://github.com/apache/beam/pull/25379#discussion_r1100421402


##########
playground/backend/internal/code_processing/code_processing_test.go:
##########
@@ -628,8 +628,8 @@ func Test_getRunOrTestCmd(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			if got := getExecuteCmd(tt.args.isUnitTest, tt.args.executor, tt.args.ctxWithTimeout); !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("getExecuteCmd() = %v, want %v", got, tt.want)
+			if got := getExecuteCmd(tt.args.isUnitTest, tt.args.executor, tt.args.ctxWithTimeout); got.String() != tt.want.String() {

Review Comment:
   Could you try this? https://github.com/google/go-cmp
   The problem with comparing strings is that the test becomes difficult to identify the exact reason for why it failed without drilling down further.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org