-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Rerun failing tests #14144
Rerun failing tests #14144
Conversation
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🤖 CI automation will test this PR automatically. 🐫 Apache Camel Committers, please review the following items:
|
parent/pom.xml
Outdated
<!-- lets re-run the failed test one more time, just to be sure --> | ||
<rerunFailingTestsCount>0</rerunFailingTestsCount> | ||
<!-- lets re-run the failed test, just to be sure --> | ||
<rerunFailingTestsCount>2</rerunFailingTestsCount> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for the record: both GH actions and ASF already do this by default (2 for unit tests and 1 for integration tests).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orpiske I don't see tests being rerun in the following failed builds however: https://github.com/apache/camel/actions/runs/8925211751/job/24513370969?pr=14042
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the surefire.rerunFailingTestsCount
system property is used, because the plugin has a specific configuration set to 0 and the property is only used as a default.
If we want the system property to take precedence, we need to remove the line or use something like:
<rerunFailingTestsCount>${surefire.rerunFailingTestsCount}</rerunFailingTestsCount>
and eventually define it with a default value:
<properties>
<surefire.rerunFailingTestsCount>2</surefire.rerunFailingTestsCount>
</properties>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gnodet oh, so you mean this one is overriding the property we set manually? OMG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, it may be necessary to do the same in a few more places (and also for the failsafe plugin). I looked briefly at the code and there's a few more places where this is set.
Good catch!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gnodet oh, so you mean this one is overriding the property we set manually? OMG.
Yes, the properties used as default values for plugin configs are... defaults ;-)
So if the plugin configuration specifically sets a value, the property won't be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, it may be necessary to do the same in a few more places (and also for the failsafe plugin). I looked briefly at the code and there's a few more places where this is set.
Good catch!!!
FWIW, the rerunFailingTestsCount
is not explicitely set in the failsafe plugin config, so that one is not a problem and the failsafe.rerunFailingTestsCount
system property should be honored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orpiske I don' really mind the default value, but I need the rerun to happen in GitHub. So if you prefer, I can revert the default value to 0 but keep it in the properties. Or just remove the line. It will have the same effect.
Or use a camel.surefire.rerunFailingTestsCount
as we have for some other properties... but that will need to adjust all the scripts / GitHub actions.
If you're fine with the current state, I can simply merge :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gnodet I am fine with the current approach ... it will be great to have this flag working! Let's go ahead and merge it.
No description provided.