From 5a993dd90306ae3c639995b9b4af3ecba313f719 Mon Sep 17 00:00:00 2001 From: John Verhaeg Date: Thu, 28 Feb 2013 10:47:56 -0600 Subject: [PATCH] HHH-8039: Changed evaluate method to handle annotation for @BeforeClass methods --- .../hibernate/testing/junit4/BeforeClassCallbackHandler.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BeforeClassCallbackHandler.java b/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BeforeClassCallbackHandler.java index 88274c843e..08ce828134 100644 --- a/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BeforeClassCallbackHandler.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BeforeClassCallbackHandler.java @@ -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(); } }