Skip to content

Instantly share code, notes, and snippets.

@RainerW
Created June 26, 2012 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RainerW/2998888 to your computer and use it in GitHub Desktop.
Save RainerW/2998888 to your computer and use it in GitHub Desktop.
patch in Parentrunner.java
########### Original
/**
* Runs a {@link Statement} that represents a leaf (aka atomic) test.
*/
protected final void runLeaf(Statement statement, Description description,
RunNotifier notifier) {
EachTestNotifier eachNotifier= new EachTestNotifier(notifier, description);
eachNotifier.fireTestStarted();
try {
statement.evaluate();
} catch (AssumptionViolatedException e) {
eachNotifier.addFailedAssumption(e);
} catch (Throwable e) {
eachNotifier.addFailure(e);
} finally {
eachNotifier.fireTestFinished();
}
}
#################### patched
/**
* Runs a {@link Statement} that represents a leaf (aka atomic) test.
*/
protected final void runLeafPatched(Statement statement, Description description,
RunNotifier notifier) {
EachTestNotifier eachNotifier= new EachTestNotifier(notifier, description);
eachNotifier.fireTestStarted();
try {
statement.evaluate();
} catch (AssumptionViolatedException e) {
notifier.fireTestIgnored(description);
// eachNotifier.addFailedAssumption(e);
} catch (Throwable e) {
eachNotifier.addFailure(e);
} finally {
eachNotifier.fireTestFinished();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment