You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
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.
It probably does not fail for you locally as you have the region configured locally for example in ~/.aws/config.
So the bug here probably is that the shared field initializers are executed for ignored specs.
publicintrun() {
// 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);
returnOK;
}
createSpecInstance(true);
runSharedInitializer();
runSpec();
returnresetStatus(SPEC);
}
And now it is triggered unconditionally in SpecNode#prepare. @leonard84 can you have a look into this as you did all the JUnit 5 changes?
I guess this should better be fixed before 2.0 final.
Activity
Vampire commentedon May 25, 2020
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.
It probably does not fail for you locally as you have the region configured locally for example in
~/.aws/config.So the bug here probably is that the shared field initializers are executed for ignored specs.
Vampire commentedon May 25, 2020
Jep, 1.3 code in
BaseSpecRunner:And now it is triggered unconditionally in
SpecNode#prepare.@leonard84 can you have a look into this as you did all the JUnit 5 changes?
I guess this should better be fixed before 2.0 final.
jameskleeh commentedon May 26, 2020
@Vampire Thanks for looking into it
leonard84 commentedon Aug 20, 2020
@marcphilipp any idea why it might ignore the
shouldBeSkippedcheck?marcphilipp commentedon Aug 20, 2020
Node.prepareis called beforeNode.shouldBeSkipped. Is that the underlying issue?leonard84 commentedon Aug 21, 2020
Probably, so we should check the skip state there and don't create the shared instance if we want to skip the spec anyway.
Check skipped state in Node.prepare and do nothing if already skipped
Check skipped state in Node.prepare and do nothing if already skipped
Check skipped state in Node.prepare and do nothing if already skipped
Check skipped state in Node.prepare and do nothing if already skipped
Check skipped state in Node.prepare and do nothing if already skipped (…
jameskleeh commentedon Sep 8, 2020
Thanks for the fix @leonard84 !
leonard84 commentedon Sep 9, 2020
@jameskleeh could you verify that it fixes you problem?
jameskleeh commentedon Sep 30, 2020
@leonard84 I'd love to. Can you do a release with this change?
Vampire commentedon Sep 30, 2020
Just try it in the snapshot version. Add
https://oss.sonatype.org/content/repositories/snapshotsas repository and use2.0-SNAPSHOTas version.