harshilv17 opened a new pull request, #41728:
URL: https://github.com/apache/beam/pull/41728

   Fixes #41727, a subtask of #18687.
   
   Ports `CombinePerKeyExamplesTest` off the deprecated `DoFnTester`: 
`ExtractLargeWordsFn` and `FormatShakespeareOutputFn` now run in a 
`TestPipeline` with `PAssert`, the same way `BigQueryTornadoesTest` next to it 
does. The assertions now check the exact output (`containsInAnyOrder`) rather 
than `hasItem` for each expected element, so an extra output, such as a word 
shorter than `MIN_WORD_LENGTH`, would now fail the test.
   
   The PTransform style guide still recommended `DoFnTester` for unit testing 
`DoFn`s; it now points at `TestPipeline` and `PAssert`. `CombineFnTester` and 
`SourceTestUtils` are unchanged.
   
   Ran `CombinePerKeyExamplesTest` locally with JDK 17 (both pass); 
`spotlessCheck` and `checkstyleTest` are clean. Adding an unexpected element to 
the expected output makes `testExtractLargeWordsFn` fail.
   
   - [x] Small/focused contribution (ICLA not required).
   - [x] Mentions the issue (`Fixes #41727`).
   - [ ] `CHANGES.md`: not needed, test and doc change only.
   


-- 
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]

Reply via email to