ahmedabu98 commented on code in PR #40975:
URL: https://github.com/apache/beam/pull/40975#discussion_r4473023361
##########
sdks/go/pkg/beam/runners/prism/internal/coders_test.go:
##########
@@ -348,7 +348,24 @@ func Test_pullDecoder(t *testing.T) {
},
},
},
- []byte{4, 0, 1, 2, 3},
+ []byte{0, 0, 0, 4, 0, 1, 2, 3},
Review Comment:
I think my agent was just being generous and fixed a test that accidentally
passed. Here's the logic:
The decoder starts by reading a 4-byte big-endian number indicating the
length. In the old case, `{4, 0, 1, 2}` meant 67,109,122 elements. The test
passed only because it kept reading until EOF.
The new case, `{0, 0, 0, 4, ...}` is a real length of 4, followed by 4
elements
--
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]