IO tests should exercise Runtime Values where supported
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 205
Description
The only tests I have found for `ValueProvider` parameterized methods is that they are not evaluated during pipeline construction time. This is missing out on several important pieces:
1. https://stackoverflow.com/questions/44967898/notify-when-textio-is-done-writing-a-file seems to be a problem with an AvroIO write using a RuntimeValueProvider being non-serializable (current theory is because of an anonymous inner class capturing the enclosing AvroIO.Write instance which has non-serializable fields).
2. Testing that the code paths that actually read the file do so correctly when parameterized.
We should update the developer documentation to describe what the requirements are for a parameterized IO and provide guidance on what tests are needed and how to write them.
Imported from Jira [BEAM-2577](https://issues.apache.org/jira/browse/BEAM-2577). Original Jira may contain additional context.
Reported by: bchambers.
Contributor guide
Research direction
Start by locating the existing tests for ValueProvider parameterized methods and the developer documentation covering parameterized IO. Document the requirements for parameterized IO, explain how to test RuntimeValueProvider code paths, and include guidance addressing serialization and file-reading behavior; done means the guidance is present and actionable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation, testing-qa
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100