eas5 opened a new pull request #10682: URL: https://github.com/apache/kafka/pull/10682
Problem: (1) Conditions or full repetitions within a test method may produce a false test outcome. Once a condition is not met, and the code block inside the condition is not executed, a false 'passed' outcome can be produced without the test ever being executed. (2) A test method with many individual assertions stops being executed on the first failed assertion, which prevents the remaining ones' execution. The difference between these assertions lies in different arguments only. Solution: Parameterized tests make it possible to run a test multiple times with different arguments. Using JUnit's parameterized tests feature instead of a repetition structure enables the repeated block to function as an independent test. This way, we could make the original tests become as many independent ones as there are versions to be tested. In this refactoring, no original assertion parameter was changed. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org