harshilv17 opened a new pull request, #41202: URL: https://github.com/apache/beam/pull/41202
Fixes #18693. Ports `BatchViewOverridesTest` off the deprecated `DoFnTester`. `TestPipeline` doesn't fit here. These DoFns number their output by position within a bundle (`ToIsmRecordForGlobalWindowDoFn` counts elements, the map-like and metadata fns count per window), and the tests assert those exact positions and their order. That needs one bundle with a known input order, which a pipeline doesn't guarantee. So, like the `DatastoreV1Test` port (#40866), the test gets a `processBundle` helper that runs the fn in-process through `DoFnRunners.simpleRunner`. Two additions over that helper: - it collects outputs per tag, because `ToIsmRecordForMapLikeDoFn` also writes the size and entry-set side outputs that `testToIsmRecordForMapLikeDoFn` checks; - it unwraps `UserCodeException`, so the two exception tests still expect the fn's own `IllegalStateException` and message. The assertions themselves are unchanged. `:runners:google-cloud-dataflow-java:test --tests BatchViewOverridesTest` passes (10/10), and `spotlessApply` and `checkstyleTest` are clean. - [x] Small/focused contribution (ICLA not required). - [x] Mentions the issue (`Fixes #18693`). - [ ] `CHANGES.md`: not needed, test-only change. -- 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]
