riteshghorse commented on a change in pull request #16629:
URL: https://github.com/apache/beam/pull/16629#discussion_r798649495



##########
File path: sdks/go/pkg/beam/core/funcx/fn_test.go
##########
@@ -291,6 +301,96 @@ func TestEmits(t *testing.T) {
        }
 }
 
+func TestPane(t *testing.T) {
+       tests := []struct {
+               Name   string
+               Params []FnParamKind
+               Pos    int
+               Exists bool
+       }{
+               {
+                       Name:   "pane input",
+                       Params: []FnParamKind{FnContext, FnPane},
+                       Pos:    1,
+                       Exists: true,
+               },
+               {
+                       Name:   "no pane input",
+                       Params: []FnParamKind{FnContext, FnEventTime},
+                       Pos:    -1,
+                       Exists: false,
+               },
+       }
+
+       for _, test := range tests {
+               test := test
+               t.Run(test.Name, func(t *testing.T) {
+                       // Create a Fn with a filled params list.
+                       params := make([]FnParam, len(test.Params))
+                       for i, kind := range test.Params {
+                               params[i].Kind = kind
+                               params[i].T = nil
+                       }
+                       fn := new(Fn)
+                       fn.Param = params

Review comment:
       I agree.




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


Reply via email to