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