damccorm commented on a change in pull request #16830:
URL: https://github.com/apache/beam/pull/16830#discussion_r804954121



##########
File path: sdks/go/pkg/beam/testing/ptest/ptest_test.go
##########
@@ -0,0 +1,62 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ptest
+
+import (
+       "testing"
+
+       "github.com/apache/beam/sdks/v2/go/pkg/beam/testing/passert"
+)
+
+func TestCreate(t *testing.T) {
+       inputs := []interface{}{"a", "b", "c"}
+       p, s, col := Create(inputs)
+       passert.EqualsList(s, col, inputs)
+       if err := Run(p); err != nil {
+               t.Errorf("create pipeline failed, got %v", err)

Review comment:
       Style nit (treat any style comments from me with a grain of salt since 
I'm new to the language): prefer identifying the function in your error - 
https://github.com/golang/go/wiki/TestComments#identify-the-function - and 
probably use "got, want" style, so `("Run(p) = %q, want nil", err)`
   
   In particular here (and below) the pipeline creation isn't really what's 
failing, its running the pipeline which could be an issue with Create, Run, or 
passert.EqualsList (but hopefully not since that's not what we're testing)




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