[ https://issues.apache.org/jira/browse/BEAM-9020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ismaël Mejía resolved BEAM-9020. -------------------------------- Fix Version/s: 2.19.0 Resolution: Fixed > LengthPrefixUnknownCodersTest to avoid relying on AbstractMap's equality > ------------------------------------------------------------------------ > > Key: BEAM-9020 > URL: https://issues.apache.org/jira/browse/BEAM-9020 > Project: Beam > Issue Type: Improvement > Components: io-java-gcp > Reporter: Tomo Suzuki > Assignee: Luke Cwik > Priority: Major > Fix For: 2.19.0 > > Time Spent: 2h 10m > Remaining Estimate: 0h > > In an attempt for BEAM-8695 LengthPrefixUnknownCodersTest failed when trying > to upgrade google-http-client v1.34.0, because LengthPrefixUnknownCodersTest > relies on the equality of {{CloudObject}} with Map. > Class hierarchy: > {noformat} > CloudObject < GenericJson < GenericData < AbstractMap > {noformat} > It was working fine as long as CloudObject's equality inherits > AbstractMap.equality. {{GenericData}} did not override equals method in > google-http-client v1.28.0 and earlier. The comparison was checking only key > and value of a Map. > {code:java} > assertEquals( > CloudObjects.asCloudObject(prefixedWindowedValueCoder, null), // This > is a CloudObject > lengthPrefixedCoderCloudObject); // This is a > Map > {code} > However, with google-http-client v1.29.0 or higher, GenericData has its own > {{equals}} method > ([PR#589|https://github.com/googleapis/google-http-java-client/pull/589]) > that checks {{classInfo}} and thus the comparisons between a CloudObject and > a Map always fail. > Test failures when I tried to upgrade google-http-client 1.34.0 > ([Jenkins|https://builds.apache.org/job/beam_PreCommit_Java_Commit/9288/#showFailuresLink]): > {noformat} > org.apache.beam.runners.dataflow.worker.graph.LengthPrefixUnknownCodersTest.testLengthPrefixUnknownCoders > org.apache.beam.runners.dataflow.worker.graph.LengthPrefixUnknownCodersTest.testLengthPrefixForInstructionOutputNodeWithGrpcNodeSuccessor > org.apache.beam.runners.dataflow.worker.graph.LengthPrefixUnknownCodersTest.testLengthPrefixForLengthPrefixCoder > org.apache.beam.runners.dataflow.worker.graph.LengthPrefixUnknownCodersTest.testLengthPrefixForSideInputInfos > org.apache.beam.runners.dataflow.worker.graph.LengthPrefixUnknownCodersTest.testLengthPrefixParDoInstructionCoder > org.apache.beam.runners.dataflow.worker.graph.LengthPrefixUnknownCodersTest.testLengthPrefixInstructionOutputCoder > org.apache.beam.runners.dataflow.worker.graph.LengthPrefixUnknownCodersTest.testLengthPrefixWriteInstructionCoder > org.apache.beam.runners.dataflow.worker.graph.LengthPrefixUnknownCodersTest.testLengthPrefixAndReplaceUnknownCoder > org.apache.beam.runners.dataflow.worker.graph.LengthPrefixUnknownCodersTest.testLengthPrefixAndReplaceForRunnerNetwork > org.apache.beam.runners.dataflow.worker.graph.LengthPrefixUnknownCodersTest.testLengthPrefixForInstructionOutputNodeWithGrpcNodePredecessor > org.apache.beam.runners.dataflow.worker.graph.LengthPrefixUnknownCodersTest.testLengthPrefixReadInstructionCoder > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)