You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/12/03 14:04:11 UTC

[GitHub] [beam] KhaninArtur commented on a change in pull request #16123: [BEAM-13357][Playground] Update custom errors

KhaninArtur commented on a change in pull request #16123:
URL: https://github.com/apache/beam/pull/16123#discussion_r761962141



##########
File path: playground/backend/internal/errors/grpc_errors_test.go
##########
@@ -22,21 +22,28 @@ import (
 
 func TestInternalError(t *testing.T) {
 	type args struct {
-		title   string
-		message string
+		title         string
+		formatMessage string
+		arg           interface{}
 	}
 	tests := []struct {
 		name     string
 		args     args
 		expected string
 		wantErr  bool
 	}{
-		{name: "TestInternalError", args: args{title: "TEST_TITLE", message: "TEST_MESSAGE"},
-			expected: "rpc error: code = Internal desc = TEST_TITLE: TEST_MESSAGE", wantErr: true},
+		{
+			// Test case with calling InternalError method.
+			// As a result, want to receive error with correct error message.
+			name:     "TestInternalError",

Review comment:
       Do we have some negative test cases here? Like, for example, the case when the `formatMessage` doesn't match the number of `args`?




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