HHH-14828 Disable bytecode enhancement test on final fields for javassist
This commit is contained in:
parent
108a664c75
commit
2fbfaa63bc
|
@ -19,9 +19,13 @@ import javax.persistence.GeneratedValue;
|
|||
import javax.persistence.Id;
|
||||
|
||||
import org.hibernate.annotations.Immutable;
|
||||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.cfg.Environment;
|
||||
|
||||
import org.hibernate.testing.bytecode.enhancement.BytecodeEnhancerRunner;
|
||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||
import org.junit.Assume;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
|
@ -37,6 +41,15 @@ public class FinalFieldEnhancementTest extends BaseCoreFunctionalTestCase {
|
|||
};
|
||||
}
|
||||
|
||||
@Before
|
||||
public void checkBytebuddy() {
|
||||
String byteCodeProvider = Environment.getProperties().getProperty( AvailableSettings.BYTECODE_PROVIDER );
|
||||
// skip the test if the bytecode provider is Javassist
|
||||
Assume.assumeTrue( "This test will only pass with Bytebuddy bytecode enhancement (currently using '"
|
||||
+ byteCodeProvider + "')",
|
||||
byteCodeProvider == null || Environment.BYTECODE_PROVIDER_NAME_BYTEBUDDY.equals( byteCodeProvider ) );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void entityWithFinalField_constructor() {
|
||||
EntityWithFinalField entity = new EntityWithFinalField( "foo" );
|
||||
|
|
Loading…
Reference in New Issue