veblush commented on pull request #13151: URL: https://github.com/apache/beam/pull/13151#issuecomment-716891614
I guess `Java` test has real failures. (I don't think `Python_PVR_Flink` is relevant to this PR) There are two tests failing. I guess this is coming from protobuf upgrading to 3.12 (from 3.11.1) - [ProtoDynamicMessageSchemaTest.testNestedRowToProto](https://ci-beam.apache.org/job/beam_PreCommit_Java_Phrase/2812/testReport/junit/org.apache.beam.sdk.extensions.protobuf/ProtoDynamicMessageSchemaTest/testNestedRowToProto/) - [ProtoDynamicMessageSchemaTest.testMapRowToProto](https://ci-beam.apache.org/job/beam_PreCommit_Java_Phrase/2812/testReport/junit/org.apache.beam.sdk.extensions.protobuf/ProtoDynamicMessageSchemaTest/testMapRowToProto/) Because I don't think protobuf introduced actual breaking changes so I took a look at these test [code](https://github.com/apache/beam/blame/master/sdks/java/extensions/protobuf/src/test/java/org/apache/beam/sdk/extensions/protobuf/ProtoDynamicMessageSchemaTest.java#L202), ``` @Test public void testNestedRowToProto() throws InvalidProtocolBufferException { ProtoDynamicMessageSchema schemaProvider = schemaFromDescriptor(Nested.getDescriptor()); SerializableFunction<Row, DynamicMessage> fromRow = schemaProvider.getFromRowFunction(); // equality doesn't work between dynamic messages and other, // so we compare string representation assertEquals(NESTED_PROTO.toString(), fromRow.apply(NESTED_ROW).toString()); } ``` The error message is like below. ``` org.junit.ComparisonFailure: expected:<...sted_map { key: "k[1" value { primitive_double: 1.1 primitive_float: 2.2 primitive_int32: 32 primitive_int64: 64 primitive_uint32: 33 primitive_uint64: 65 primitive_sint32: 123 primitive_sint64: 124 primitive_fixed32: 30 primitive_fixed64: 62 primitive_sfixed32: 31 primitive_sfixed64: 63 primitive_bool: true primitive_string: "horsey" primitive_bytes: "\001\002\003\004" } } nested_map { key: "k2]" value { prim...> but was:<...sted_map { key: "k[2" value { primitive_double: 1.1 primitive_float: 2.2 primitive_int32: 32 primitive_int64: 64 primitive_uint32: 33 primitive_uint64: 65 primitive_sint32: 123 primitive_sint64: 124 primitive_fixed32: 30 primitive_fixed64: 62 primitive_sfixed32: 31 primitive_sfixed64: 63 primitive_bool: true primitive_string: "horsey" primitive_bytes: "\001\002\003\004" } } nested_map { key: "k1]" value { prim...> ``` From the code & output reading, it might be caused by using string comparison to compare two objects but chances are that two strings are not normalized, which could cause them to fail. (it's my wild guess) @alexvanboxel, @reuvenlax I want help from original author and review on https://github.com/apache/beam/pull/10502. ---------------------------------------------------------------- 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]
