-
Notifications
You must be signed in to change notification settings - Fork 466
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
@Ignore / @IgnoreIf not working as expected #1169
Comments
My guess would be, that with 1.x the shared fields were not initialized if the spec was ignored and that now the shared fields are initialized unconditionally. |
Jep, 1.3 code in public int run() {
// Sometimes a spec run is requested even though the spec has been excluded
// (e.g. if JUnit is in control). In such a case, the best thing we can do
// is to treat the spec as skipped.
if (spec.isExcluded() || spec.isSkipped()) {
supervisor.specSkipped(spec);
return OK;
}
createSpecInstance(true);
runSharedInitializer();
runSpec();
return resetStatus(SPEC);
} And now it is triggered unconditionally in |
@Vampire Thanks for looking into it |
@marcphilipp any idea why it might ignore the |
|
Probably, so we should check the skip state there and don't create the shared instance if we want to skip the spec anyway. |
Thanks for the fix @leonard84 ! |
@jameskleeh could you verify that it fixes you problem? |
@leonard84 I'd love to. Can you do a release with this change? |
Just try it in the snapshot version. Add |
Issue description
Tests annotated with @ignore or @IgnoreIf({ << a true condition >> }) are executed in the github actions CI
How to reproduce
I can't reproduce the issue locally. I can only reproduce on CI
https://github.com/micronaut-projects/micronaut-core/runs/697317541?check_suite_focus=true#step:7:701
Here is the test at that commit:
https://github.com/micronaut-projects/micronaut-core/blob/2a721c30de89ad52b3a7a9294341a1fd1c841f56/discovery-client/src/test/groovy/io/micronaut/discovery/propertystore/AWSParameterStoreClientSpec.groovy#L48
Note that with Spock 1 / Groovy 2.5 this is not an issue
Additional Environment information
Gradle 6, Spock 2.0 M2, Groovy 3
Java/JDK
That specific build is failing on JDK8
Groovy version
3.0.3
Gradle
6.3
Operating System
The CI is running on a variant of Linux
IDE
N/A
Build-tool dependencies used
Gradle/Grails
Given that this only fails on CI it seems there is probably some odd set of circumstances, however I wanted to see if perhaps you had any ideas for me to debug, etc.. Thanks!
The text was updated successfully, but these errors were encountered: