Skip test failing on Java 1.9 using Gradle
This commit is contained in:
parent
bd8c3c226d
commit
cc21eeb1af
|
@ -120,6 +120,17 @@ dependencies {
|
|||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
|
||||
if ( JavaVersion.current().isJava9Compatible() ) {
|
||||
logger.warn( '[WARN] Skipping Javassist-related tests for hibernate-core due to Javassist JDK 9 incompatibility' )
|
||||
|
||||
// we need to exclude tests using Javassist enhancement, which does not properly support
|
||||
// Java 9 yet - https://issues.jboss.org/browse/JASSIST-261
|
||||
test {
|
||||
// rather than wild-cards, keep an explicit list
|
||||
exclude 'org/hibernate/userguide/fetching/LazyBasicAttributeTest.class'
|
||||
}
|
||||
}
|
||||
|
||||
processTestResources.doLast( {
|
||||
copy {
|
||||
from( sourceSets.test.java.srcDirs ) {
|
||||
|
|
|
@ -16,7 +16,6 @@ import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase;
|
|||
import org.hibernate.userguide.model.Image;
|
||||
|
||||
import org.hibernate.testing.RequiresDialect;
|
||||
import org.hibernate.testing.Skip;
|
||||
import org.hibernate.test.util.jdbc.PreparedStatementSpyConnectionProvider;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -61,7 +60,6 @@ public class LazyBasicAttributeTest extends BaseEntityManagerFunctionalTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
@Skip(condition = Skip.JdkVersion._1_9.class, message = "On Java 1.9, bytecode enhancement does not work on pre-release!")
|
||||
public void test() {
|
||||
doInJPA( this::entityManagerFactory, entityManager -> {
|
||||
Image image = new Image();
|
||||
|
|
|
@ -60,12 +60,4 @@ public @interface Skip {
|
|||
}
|
||||
}
|
||||
}
|
||||
interface JdkVersion {
|
||||
class _1_9 implements Matcher {
|
||||
@Override
|
||||
public boolean isMatch() {
|
||||
return System.getProperty("java.version").toLowerCase().startsWith( "1.9" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue