test failure fix
This commit is contained in:
parent
29ad8e9cb9
commit
563af13c1f
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue