lostluck commented on a change in pull request #11443: [BEAM-9775] Add Go 
support for SDF StandardRequirements.
URL: https://github.com/apache/beam/pull/11443#discussion_r410503689
 
 

 ##########
 File path: sdks/go/pkg/beam/core/runtime/graphx/translate_test.go
 ##########
 @@ -157,8 +170,34 @@ func TestMarshal(t *testing.T) {
                        if got, want := len(p.GetRootTransformIds()), 
test.roots; got != want {
                                t.Errorf("got %d roots, want %d : %v", got, 
want, proto.MarshalTextString(p))
                        }
+                       if got, want := p.GetRequirements(), test.requirements; 
!cmp.Equal(got, want) {
 
 Review comment:
   Since order doesn't matter for the results, but in the future the SDK might 
add more than this requirement, consider adding a transformer to sort the 
slices for the equals check.
   
   
https://godoc.corp.google.com/pkg/google3/third_party/golang/cmp/cmp#example_Option_sortedSlice

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to