HHH-8039: Changed evaluate method to handle annotation for @BeforeClass methods
This commit is contained in:
parent
69fda3d610
commit
5a993dd903
|
@ -44,8 +44,8 @@ public class BeforeClassCallbackHandler extends Statement {
|
||||||
public void evaluate() throws Throwable {
|
public void evaluate() throws Throwable {
|
||||||
try {
|
try {
|
||||||
runner.getTestClassMetadata().performBeforeClassCallbacks( runner.getTestInstance() );
|
runner.getTestClassMetadata().performBeforeClassCallbacks( runner.getTestInstance() );
|
||||||
}
|
wrappedStatement.evaluate();
|
||||||
catch ( CallbackException error ) {
|
} catch ( Throwable error ) {
|
||||||
runner.setBeforeClassMethodFailed();
|
runner.setBeforeClassMethodFailed();
|
||||||
if ( runner.getTestClass().getJavaClass().getAnnotation( FailureExpected.class ) == null &&
|
if ( runner.getTestClass().getJavaClass().getAnnotation( FailureExpected.class ) == null &&
|
||||||
( !runner.useNewMetamodel() ||
|
( !runner.useNewMetamodel() ||
|
||||||
|
@ -53,6 +53,5 @@ public class BeforeClassCallbackHandler extends Statement {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wrappedStatement.evaluate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue