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 {
try {
runner.getTestClassMetadata().performBeforeClassCallbacks( runner.getTestInstance() );
}
catch ( CallbackException error ) {
wrappedStatement.evaluate();
} catch ( Throwable error ) {
runner.setBeforeClassMethodFailed();
if ( runner.getTestClass().getJavaClass().getAnnotation( FailureExpected.class ) == null &&
( !runner.useNewMetamodel() ||
@ -53,6 +53,5 @@ public class BeforeClassCallbackHandler extends Statement {
throw error;
}
}
wrappedStatement.evaluate();
}
}