-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@ParameterizedRepeatedIfExceptionsTest test status is failed for any repetion #45
Comments
Well, if you ask me, these line is to blame:
just change it to
and you'll get the desired effect, of the failed execution being treated as skipped. |
Any chance we can have this enhancement? |
If you badly need it feel free to grab this fork: https://github.com/Tofel/rerunner-jupiter It is also thread safe-ish (I sometimes do run into issues with test repetition if they take a long time to execute and somehow they are missing from extension context), so you can run tests in parallel. It works nicely most of the time. |
I bear bad news. I didn't notice a bad side effect when I made that PR 🙈: with parameterized tests, if none of the repetitions succeed, the last one does not fail but gets skipped as well. @Tofel do you have a solution for this? You seem to have a much better grasp of this than I have. Do you mind making a PR with your enhancements? Your fork is not really on mvnrepo. |
alright. I have something on my master branch that I stole from @artsok 's RepeatIfExceptionExtension. It does do the trick. Almost.
|
When writing the last comment, my thoughts got so ordered about it that I believe I fixed the issue now properly. The issue with missing tests for the whole issue remains 😞 |
Ha! Was about to sit to it and fix what you found, because of course in my version tests would never fail 🤦♂ . If now you combine your solution with mine (or with every class variable packed in |
Ah... I have my version on a private Maven. I think once your or mine is 100% functional it is better to create a PR to @artsok's repo than to deploy our forked versions to Maven Central. |
Maybe you can run a second PR against Artem's code? |
I don't think I'd ever deploy a fork to Maven Central (I wouldn't even know how). But I'm sure thread-safety will be appreciated |
Okay, will have a look tomorrow at the test and will create a PR, as currently the code is super ugly :-) At some point I'll also have to solve this issue, which happens every now and then:
|
oh, I haven't seen that one yet. Will the test then fail or does it throw an error? Just so I can be on the look out for it and in Intellj I'd look for a yellow or a red outcome ;) |
It fails and is not repeated, because that exception is thrown from the |
Ha! I found out what I did wrong with the tests. Found a possibility to write tests for what I did. Just wanna prove they'll run through maven as expected before I push them. |
Using the following annotation
@ParameterizedRepeatedIfExceptionsTest (repeats = 4, minSuccess = 1, name = "{0}", repeatedName = "repeat", exceptions = AssertionError.class)
If for one value the test runs 3 times - failure, failed repeat, successfull repeat - this results in 2 failed and one passed test.
I would expect one passed test as for @RepeatedIfExceptionsTest.
The text was updated successfully, but these errors were encountered: