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 2020/08/14 04:11:57 UTC

[GitHub] [beam] lostluck commented on a change in pull request #12554: [BEAM-9615] Map user types to Schema reps.

lostluck commented on a change in pull request #12554:
URL: https://github.com/apache/beam/pull/12554#discussion_r470399845



##########
File path: sdks/go/pkg/beam/core/runtime/graphx/schema/schema_test.go
##########
@@ -161,18 +354,22 @@ func TestSchemaConversion(t *testing.T) {
 				if err != nil {
 					t.Fatalf("error ToType(%v) = %v", test.st, err)
 				}
-
-				if d := cmp.Diff(reflect.New(test.rt).Elem().Interface(), reflect.New(got).Elem().Interface()); d != "" {
-					t.Errorf("diff (-want, +got): %v", d)
+				if !test.rt.AssignableTo(got) {
+					t.Errorf("%v not assignable to %v", test.rt, got)
+					if d := cmp.Diff(reflect.New(test.rt).Elem().Interface(), reflect.New(got).Elem().Interface()); d != "" {
+						t.Errorf("diff (-want, +got): %v", d)
+					}
 				}
 			}
 			{
 				got, err := FromType(test.rt)
 				if err != nil {
 					t.Fatalf("error FromType(%v) = %v", test.rt, err)
 				}
-
-				if d := cmp.Diff(test.st, got); d != "" {
+				if d := cmp.Diff(test.st, got,
+					protocmp.Transform(),
+					protocmp.IgnoreFields(proto.MessageV2(&pipepb.Schema{}), "id", "options"),

Review comment:
       I'll try removing it before submitting. 
   I might have added this at an earlier iteration when the options also contained the fully qualified paths for comparison, which could vary from machine to machine. Those aren't being saved in the options anymore so it's fair for use to get rid of at this point I think....




----------------------------------------------------------------
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:
users@infra.apache.org