HHH-8039: Changed evaluate method to handle annotation for @BeforeClass methods

This commit is contained in:
John Verhaeg 2013-02-28 10:47:56 -06:00
parent 69fda3d610
commit 5a993dd903
1 changed files with 2 additions and 3 deletions

View File

@ -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();
} }
} }