You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/05/12 23:31:43 UTC
[GitHub] [kafka] eas5 opened a new pull request #10682: Refactored test using parameterization
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:
users@infra.apache.org
[GitHub] [kafka] showuon commented on pull request #10682: MINOR: Refactored test using parameterization
Posted by GitBox <gi...@apache.org>.
showuon commented on pull request #10682:
URL: https://github.com/apache/kafka/pull/10682#issuecomment-1042548348
@eas5 , thanks for the patch! Since it's been a while, could you rebase to trunk and check the jenkins test results again. Thanks.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] eas5 commented on pull request #10682: MINOR: Refactored test using parameterization
Posted by GitBox <gi...@apache.org>.
eas5 commented on pull request #10682:
URL: https://github.com/apache/kafka/pull/10682#issuecomment-1043317472
> @eas5 , thanks for the patch! Since it's been a while, could you rebase to trunk and check the jenkins test results again. Thanks.
Hi @showuon! Done as requested! Thank you!
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] eas5 commented on pull request #10682: MINOR: Refactored test using parameterization
Posted by GitBox <gi...@apache.org>.
eas5 commented on pull request #10682:
URL: https://github.com/apache/kafka/pull/10682#issuecomment-840526680
Dear committers,
I believe the build failure is unrelated to this pull request, once I have been able to run the tests locally successfully. If possible, I would like you to trigger a new build or verify the passed status of the test this PR is intended for in the CI logs.
Thank you!
--
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:
users@infra.apache.org
[GitHub] [kafka] eas5 commented on pull request #10682: MINOR: Refactored test using parameterization
Posted by GitBox <gi...@apache.org>.
eas5 commented on pull request #10682:
URL: https://github.com/apache/kafka/pull/10682#issuecomment-846025615
@showuon thanks for your answer! About your question, yes, the test name can be customized to display the tested version. May I?
--
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:
users@infra.apache.org
[GitHub] [kafka] eas5 edited a comment on pull request #10682: MINOR: Refactored test using parameterization
Posted by GitBox <gi...@apache.org>.
eas5 edited a comment on pull request #10682:
URL: https://github.com/apache/kafka/pull/10682#issuecomment-846025615
@showuon thanks for your answer! About your question, yes, the test name can be customized to display the tested version. I have made the changes.
--
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:
users@infra.apache.org
[GitHub] [kafka] showuon commented on pull request #10682: MINOR: Refactored test using parameterization
Posted by GitBox <gi...@apache.org>.
showuon commented on pull request #10682:
URL: https://github.com/apache/kafka/pull/10682#issuecomment-846337639
Great! Thank you.
--
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:
users@infra.apache.org