test failure fix

This commit is contained in:
Steve Ebersole 2012-09-21 08:36:00 -05:00
parent 29ad8e9cb9
commit 563af13c1f
1 changed files with 4 additions and 8 deletions

View File

@ -28,6 +28,7 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import org.hibernate.HibernateException;
import org.hibernate.bytecode.spi.ByteCodeHelper;
import org.junit.Rule;
@ -35,6 +36,7 @@ import org.junit.Test;
import org.hibernate.testing.junit4.BaseUnitTestCase;
import org.hibernate.testing.junit4.ClassLoadingIsolater;
import org.hibernate.testing.junit4.ExtraAssertions;
import static org.junit.Assert.fail;
@ -125,14 +127,8 @@ public class NoCdiAvailableTest extends BaseUnitTestCase {
mainMethod.invoke( null );
fail( "Expecting failure from missing CDI classes" );
}
catch (InvocationTargetException e) {
try {
throw e.getTargetException();
}
catch (CdiClassLoadException expected) {
}
// catch (ClassCastException expectedAlt) {
// }
catch (InvocationTargetException expected) {
// hard to assert specific exception types due to classloader trickery
}
}
}