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
I am using a subclass of RunListener to listen and respond to JUnit events. I'm having an issue handling assumptionFailures in @BeforeClass annotated methods...
In other scopes (@test or @before methods) assumptionFailures seem to correctly call EachTestNotifier's addFailedAssumption() and in time fireTestAssumptionFailed methods as I would expect. This is from the ParentRunner class:
Now an assumption failure looks the same as an ignored test although there is no corresponding @ignore attribute to glean any information from.
Why is an assumption failure being turned into an ignored test only in this case? Is there a reason it can't be treated as a normal assumptionFailure? Since there is still logic being used to determine the validity of the assumption, this isn't the same as a straight up @ignored test.
The text was updated successfully, but these errors were encountered:
I am using a subclass of RunListener to listen and respond to JUnit events. I'm having an issue handling assumptionFailures in @BeforeClass annotated methods...
In other scopes (@test or @before methods) assumptionFailures seem to correctly call EachTestNotifier's addFailedAssumption() and in time fireTestAssumptionFailed methods as I would expect. This is from the ParentRunner class:
When an AssumptionViolatedException is caught, listeners are notified of this.
However, when an assumption failure is raised in a @BeforeClass annotated method instead we get a call to fireTestIgnored as can be seen here:
Now an assumption failure looks the same as an ignored test although there is no corresponding @ignore attribute to glean any information from.
Why is an assumption failure being turned into an ignored test only in this case? Is there a reason it can't be treated as a normal assumptionFailure? Since there is still logic being used to determine the validity of the assumption, this isn't the same as a straight up @ignored test.
The text was updated successfully, but these errors were encountered: