Skip to content

Commit

Permalink
Call IRunListener.featureSkipped for skipped features
Browse files Browse the repository at this point in the history
FeatureNode.nodeSkipped overrides JUnit 5 platform's Node.nodeSkipped.
It fetches the feature info and then calls IRunListener.featureSkipped
for all run listeners registered on the spec.

Relates to spockframework#1662.
  • Loading branch information
kriegaex committed May 6, 2023
1 parent 5320e27 commit e1833e9
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ public void around(SpockExecutionContext context, Invocation<SpockExecutionConte
errorInfoCollector.assertEmpty();
}

@Override
public void nodeSkipped(SpockExecutionContext context, TestDescriptor testDescriptor, SkipResult result) {
FeatureInfo featureInfo = getNodeInfo();
featureInfo.getSpec().getListeners().forEach(iRunListener -> iRunListener.featureSkipped(featureInfo));
}

@Override
public boolean mayRegisterTests() {
return getNodeInfo().isParameterized();
Expand Down

0 comments on commit e1833e9

Please sign in to comment.