HHH-17746 update tests to use streamlined API

This commit is contained in:
Gavin King 2024-02-17 11:27:09 +01:00
parent e732cddb09
commit 2558f9843a
114 changed files with 221 additions and 203 deletions

View File

@ -37,7 +37,7 @@ public class OracleSQLCallableStatementProxyTest extends
protected void configure(Configuration configuration) {
configuration.setProperty(
org.hibernate.cfg.AvailableSettings.CONNECTION_PROVIDER,
C3P0ConnectionProvider.class.getName()
C3P0ConnectionProvider.class
);
}

View File

@ -34,8 +34,8 @@ public class SkipLoadingSequenceInformationTest extends BaseCoreFunctionalTestCa
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.SEQUENCE_INCREMENT_SIZE_MISMATCH_STRATEGY, SequenceMismatchStrategy.NONE.name() );
configuration.setProperty( Environment.DIALECT, VetoingDialect.class.getName() );
configuration.setProperty( AvailableSettings.SEQUENCE_INCREMENT_SIZE_MISMATCH_STRATEGY, SequenceMismatchStrategy.NONE );
configuration.setProperty( Environment.DIALECT, VetoingDialect.class );
}
@Entity(name="seqentity")

View File

@ -9,6 +9,7 @@ package org.hibernate.orm.test.annotations.beanvalidation;
import java.math.BigDecimal;
import jakarta.validation.ConstraintViolationException;
import org.hibernate.boot.beanvalidation.ValidationMode;
import org.junit.Test;
import org.hibernate.Session;
@ -17,6 +18,7 @@ import org.hibernate.cfg.Configuration;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import static org.hibernate.cfg.ValidationSettings.JAKARTA_VALIDATION_MODE;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
@ -45,7 +47,7 @@ public class BeanValidationAutoTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( "jakarta.persistence.validation.mode", "AUTO" );
cfg.setProperty( JAKARTA_VALIDATION_MODE, ValidationMode.AUTO );
}
@Override

View File

@ -13,6 +13,7 @@ import jakarta.validation.MessageInterpolator;
import jakarta.validation.Validation;
import jakarta.validation.ValidatorFactory;
import org.hibernate.boot.beanvalidation.ValidationMode;
import org.junit.Test;
import org.hibernate.Session;
@ -20,6 +21,8 @@ import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import static org.hibernate.cfg.ValidationSettings.JAKARTA_VALIDATION_FACTORY;
import static org.hibernate.cfg.ValidationSettings.JAKARTA_VALIDATION_MODE;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
@ -69,7 +72,7 @@ public class BeanValidationProvidedFactoryTest extends BaseCoreFunctionalTestCas
final jakarta.validation.Configuration<?> configuration = Validation.byDefaultProvider().configure();
configuration.messageInterpolator( messageInterpolator );
ValidatorFactory vf = configuration.buildValidatorFactory();
cfg.getProperties().put( "jakarta.persistence.validation.factory", vf );
cfg.setProperty( "jakarta.persistence.validation.mode", "AUTO" );
cfg.getProperties().put( JAKARTA_VALIDATION_FACTORY, vf );
cfg.setProperty( JAKARTA_VALIDATION_MODE, ValidationMode.AUTO );
}
}

View File

@ -10,6 +10,7 @@ import java.math.BigDecimal;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
import org.hibernate.boot.beanvalidation.ValidationMode;
import org.junit.Test;
import org.hibernate.Session;
@ -17,6 +18,7 @@ import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import static org.hibernate.cfg.ValidationSettings.JAKARTA_VALIDATION_MODE;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
@ -193,7 +195,7 @@ public class HibernateTraversableResolverTest extends BaseCoreFunctionalTestCase
@Override
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( "jakarta.persistence.validation.mode", "AUTO" );
cfg.setProperty( JAKARTA_VALIDATION_MODE, ValidationMode.AUTO );
}
@Override

View File

@ -20,11 +20,14 @@ import jakarta.validation.constraints.NotNull;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.boot.beanvalidation.ValidationMode;
import org.hibernate.cfg.Configuration;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.junit.Test;
import static org.hibernate.cfg.ValidationSettings.JAKARTA_VALIDATION_MODE;
/**
* @author Ryan Emerson
*/
@ -39,7 +42,7 @@ public class MergeNotNullCollectionTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( "jakarta.persistence.validation.mode", "AUTO" );
cfg.setProperty( JAKARTA_VALIDATION_MODE, ValidationMode.AUTO );
}
@Test

View File

@ -19,6 +19,7 @@ import jakarta.persistence.Table;
import jakarta.validation.ConstraintViolationException;
import jakarta.validation.constraints.NotNull;
import org.hibernate.boot.beanvalidation.ValidationMode;
import org.junit.Test;
import org.hibernate.Session;
@ -30,6 +31,8 @@ import org.hibernate.testing.RequiresDialectFeature;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import static org.hibernate.cfg.ValidationSettings.JAKARTA_VALIDATION_MODE;
/**
* @author Ryan Emerson
*/
@ -48,7 +51,7 @@ public class MergeNotNullCollectionUsingIdentityTest extends BaseCoreFunctionalT
@Override
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( "jakarta.persistence.validation.mode", "AUTO" );
cfg.setProperty( JAKARTA_VALIDATION_MODE, ValidationMode.AUTO );
}
@Test

View File

@ -15,6 +15,7 @@ import org.hibernate.JDBCException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;
import org.hibernate.dialect.H2Dialect;
import org.hibernate.testing.orm.junit.BaseUnitTest;
@ -41,7 +42,7 @@ public class EmbeddableIntegratorTest {
@Test
public void testWithoutIntegrator() {
final Configuration cfg = new Configuration().addAnnotatedClass( Investor.class )
.setProperty( "hibernate.hbm2ddl.auto", "create-drop" );
.setProperty( Environment.HBM2DDL_AUTO, "create-drop" );
ServiceRegistryUtil.applySettings( cfg.getStandardServiceRegistryBuilder() );
try (SessionFactory sf = cfg.buildSessionFactory()) {
Session sess = sf.openSession();
@ -76,7 +77,7 @@ public class EmbeddableIntegratorTest {
public void testWithTypeContributor() {
final Configuration cfg = new Configuration().addAnnotatedClass( Investor.class )
.registerTypeContributor( new InvestorTypeContributor() )
.setProperty( "hibernate.hbm2ddl.auto", "create-drop" );
.setProperty( Environment.HBM2DDL_AUTO, "create-drop" );
ServiceRegistryUtil.applySettings( cfg.getStandardServiceRegistryBuilder() );
try (SessionFactory sf = cfg.buildSessionFactory(); Session sess = sf.openSession()) {
try {

View File

@ -35,7 +35,7 @@ public class ImageTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
super.configure( configuration );
configuration.setProperty( AvailableSettings.WRAPPER_ARRAY_HANDLING, WrapperArrayHandling.ALLOW.name() );
configuration.setProperty( AvailableSettings.WRAPPER_ARRAY_HANDLING, WrapperArrayHandling.ALLOW );
}
@Test

View File

@ -18,7 +18,7 @@ import org.hibernate.cfg.Environment;
public class ManyToManyMaxFetchDepth0Test extends ManyToManyTest {
@Override
protected void configure(Configuration cfg) {
cfg.setProperty( Environment.MAX_FETCH_DEPTH, "0" );
cfg.setProperty( Environment.MAX_FETCH_DEPTH, 0 );
super.configure( cfg );
}
}

View File

@ -47,7 +47,7 @@ public class ManyToManyTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
super.configure( configuration );
configuration.setProperty( AvailableSettings.DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG.name() );
configuration.setProperty( AvailableSettings.DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG );
// configuration.setImplicitNamingStrategy( ImplicitNamingStrategyJpaCompliantImpl.INSTANCE );
}

View File

@ -27,7 +27,7 @@ public class NotNullManyToOneTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.JAKARTA_VALIDATION_MODE, ValidationMode.AUTO.name() );
configuration.setProperty( AvailableSettings.JAKARTA_VALIDATION_MODE, ValidationMode.AUTO );
}
@Override

View File

@ -353,8 +353,8 @@ public class ImmutableNaturalKeyLookupTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration cfg) {
cfg.setProperty( Environment.GENERATE_STATISTICS, "true" );
cfg.setProperty( Environment.USE_QUERY_CACHE, "true" );
cfg.setProperty( Environment.GENERATE_STATISTICS, true );
cfg.setProperty( Environment.USE_QUERY_CACHE, true );
}

View File

@ -26,6 +26,7 @@ import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hibernate.cfg.CacheSettings.USE_QUERY_CACHE;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
@ -379,6 +380,6 @@ public class NaturalIdTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration cfg) {
cfg.setProperty( "hibernate.cache.use_query_cache", "true" );
cfg.setProperty( USE_QUERY_CACHE, true );
}
}

View File

@ -14,6 +14,7 @@ import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.CriteriaQuery;
import jakarta.persistence.criteria.Root;
import org.hibernate.query.NullPrecedence;
import org.junit.Assert;
import org.junit.Test;
@ -34,7 +35,7 @@ import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
public class DefaultNullOrderingTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.DEFAULT_NULL_ORDERING, "last" );
configuration.setProperty( AvailableSettings.DEFAULT_NULL_ORDERING, NullPrecedence.LAST );
}
@Override

View File

@ -34,6 +34,7 @@ import org.hibernate.graph.RootGraph;
import org.hibernate.metamodel.CollectionClassification;
import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.persister.collection.QueryableCollection;
import org.hibernate.query.NullPrecedence;
import org.hibernate.query.Query;
import org.hibernate.sql.SimpleSelect;
@ -520,8 +521,8 @@ public class OrderByTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.DEFAULT_NULL_ORDERING, "last" );
configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG.name() );
configuration.setProperty( AvailableSettings.DEFAULT_NULL_ORDERING, NullPrecedence.LAST );
configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG );
}
@Override

View File

@ -52,7 +52,7 @@ public class HHH4851Test extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( Environment.CHECK_NULLABILITY, "true" );
cfg.setProperty( Environment.CHECK_NULLABILITY, true );
}
@Override

View File

@ -25,7 +25,7 @@ public class ExplicitSqlResultSetMappingTest extends BaseCoreFunctionalTestCase
@Override
protected void configure(Configuration cfg) {
cfg.setProperty( Environment.GLOBALLY_QUOTED_IDENTIFIERS, "true" );
cfg.setProperty( Environment.GLOBALLY_QUOTED_IDENTIFIERS, true );
}
private void prepareTestData() {

View File

@ -39,7 +39,7 @@ public class BatchTest extends BaseCoreFunctionalTestCase {
@Override
public void configure(Configuration cfg) {
cfg.setProperty( Environment.STATEMENT_BATCH_SIZE, "20" );
cfg.setProperty( Environment.STATEMENT_BATCH_SIZE, 20 );
}
@Test

View File

@ -42,9 +42,9 @@ public class BatchingBatchFailureTest extends BaseCoreFunctionalTestCase {
protected void configure(Configuration configuration) {
super.configure( configuration );
// explicitly enable batching
configuration.setProperty( AvailableSettings.STATEMENT_BATCH_SIZE, "5" );
configuration.setProperty( AvailableSettings.STATEMENT_BATCH_SIZE, 5 );
// and disable in-vm nullability checking (so we can force in-db not-null constraint violations)
configuration.setProperty( AvailableSettings.CHECK_NULLABILITY, "false" );
configuration.setProperty( AvailableSettings.CHECK_NULLABILITY, false );
}
@Test

View File

@ -51,7 +51,7 @@ public class BatchingInheritanceDeleteTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
super.configure( configuration );
configuration.setProperty( AvailableSettings.STATEMENT_BATCH_SIZE, "25" );
configuration.setProperty( AvailableSettings.STATEMENT_BATCH_SIZE, 25 );
}
@Test

View File

@ -41,9 +41,9 @@ public class NonBatchingBatchFailureTest extends BaseCoreFunctionalTestCase {
protected void configure(Configuration configuration) {
super.configure( configuration );
// explicitly disable batching
configuration.setProperty( AvailableSettings.STATEMENT_BATCH_SIZE, "-1" );
configuration.setProperty( AvailableSettings.STATEMENT_BATCH_SIZE, -1 );
// and disable in-vm nullability checking (so we can force in-db not-null constraint violations)
configuration.setProperty( AvailableSettings.CHECK_NULLABILITY, "false" );
configuration.setProperty( AvailableSettings.CHECK_NULLABILITY, false );
}
@Test

View File

@ -37,7 +37,7 @@ public abstract class AbstractMutationStrategyCompositeIdTest extends BaseCoreFu
super.configure( configuration );
Class<? extends SqmMultiTableMutationStrategy> strategyClass = getMultiTableBulkIdStrategyClass();
if ( strategyClass != null ) {
configuration.setProperty( AvailableSettings.QUERY_MULTI_TABLE_MUTATION_STRATEGY, strategyClass.getName() );
configuration.setProperty( AvailableSettings.QUERY_MULTI_TABLE_MUTATION_STRATEGY, strategyClass );
}
}

View File

@ -38,7 +38,7 @@ public abstract class AbstractMutationStrategyIdTest extends BaseCoreFunctionalT
if ( multiTableBulkIdStrategyClass != null ) {
configuration.setProperty(
AvailableSettings.QUERY_MULTI_TABLE_MUTATION_STRATEGY,
multiTableBulkIdStrategyClass.getName()
multiTableBulkIdStrategyClass
);
}
}

View File

@ -35,8 +35,8 @@ public class OneToOnEnhancedEntityLoadedAsReferenceTest extends BaseCoreFunction
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.DEFAULT_BATCH_FETCH_SIZE, "10" );
configuration.setProperty( AvailableSettings.MAX_FETCH_DEPTH, "0" );
configuration.setProperty( AvailableSettings.DEFAULT_BATCH_FETCH_SIZE, 10 );
configuration.setProperty( AvailableSettings.MAX_FETCH_DEPTH, 0 );
}
@Before

View File

@ -43,7 +43,7 @@ public class BatchEntityOneToManyTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, true );
}
@Before

View File

@ -43,7 +43,7 @@ public class BatchEntityOneToManyWithDisabledProxyTest extends BaseCoreFunctiona
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, true );
}
@Before

View File

@ -46,7 +46,7 @@ public class BatchEntityWithSelectFetchTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, true );
}
@Before

View File

@ -47,7 +47,7 @@ public class BatchEntityWithSelectFetchWithDisableProxyTest extends BaseCoreFunc
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, true );
}
@Before

View File

@ -52,7 +52,7 @@ public class AbstractManyToOneNoProxyTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, true );
}
@Before

View File

@ -52,7 +52,7 @@ public class ManyToOneNoProxyTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, true );
}
@Before

View File

@ -42,7 +42,7 @@ public class ManyToOneTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, true );
}
@Before

View File

@ -53,7 +53,7 @@ public class ManyToOneTestReusedColumn extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, true );
}
@Before

View File

@ -30,8 +30,8 @@ public class MultiPathCircleCascadeCheckNullFalseDelayedInsertTest extends Abstr
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( Environment.GENERATE_STATISTICS, "true" );
configuration.setProperty( Environment.STATEMENT_BATCH_SIZE, "0" );
configuration.setProperty( Environment.CHECK_NULLABILITY, "false" );
configuration.setProperty( Environment.GENERATE_STATISTICS, true );
configuration.setProperty( Environment.STATEMENT_BATCH_SIZE, 0 );
configuration.setProperty( Environment.CHECK_NULLABILITY, false );
}
}

View File

@ -30,8 +30,8 @@ public class MultiPathCircleCascadeCheckNullTrueDelayedInsertTest extends Abstra
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( Environment.GENERATE_STATISTICS, "true" );
configuration.setProperty( Environment.STATEMENT_BATCH_SIZE, "0" );
configuration.setProperty( Environment.CHECK_NULLABILITY, "true" );
configuration.setProperty( Environment.GENERATE_STATISTICS, true );
configuration.setProperty( Environment.STATEMENT_BATCH_SIZE, 0 );
configuration.setProperty( Environment.CHECK_NULLABILITY, true );
}
}

View File

@ -31,8 +31,8 @@ public class MultiPathCircleCascadeCheckNullibilityFalseTest extends AbstractMul
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( Environment.GENERATE_STATISTICS, "true" );
configuration.setProperty( Environment.STATEMENT_BATCH_SIZE, "0" );
configuration.setProperty( Environment.CHECK_NULLABILITY, "false" );
configuration.setProperty( Environment.GENERATE_STATISTICS, true );
configuration.setProperty( Environment.STATEMENT_BATCH_SIZE, 0 );
configuration.setProperty( Environment.CHECK_NULLABILITY, false );
}
}

View File

@ -30,8 +30,8 @@ public class MultiPathCircleCascadeCheckNullibilityTrueTest extends AbstractMult
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( Environment.GENERATE_STATISTICS, "true" );
configuration.setProperty( Environment.STATEMENT_BATCH_SIZE, "0" );
configuration.setProperty( Environment.CHECK_NULLABILITY, "true" );
configuration.setProperty( Environment.GENERATE_STATISTICS, true );
configuration.setProperty( Environment.STATEMENT_BATCH_SIZE, 0 );
configuration.setProperty( Environment.CHECK_NULLABILITY, true );
}
}

View File

@ -30,7 +30,7 @@ public class MultiPathCircleCascadeDelayedInsertTest extends AbstractMultiPathCi
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( Environment.GENERATE_STATISTICS, "true" );
configuration.setProperty( Environment.STATEMENT_BATCH_SIZE, "0" );
configuration.setProperty( Environment.GENERATE_STATISTICS, true );
configuration.setProperty( Environment.STATEMENT_BATCH_SIZE, 0 );
}
}

View File

@ -49,7 +49,7 @@ public class MultiPathCircleCascadeTest extends AbstractMultiPathCircleCascadeTe
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( Environment.GENERATE_STATISTICS, "true" );
configuration.setProperty( Environment.STATEMENT_BATCH_SIZE, "0" );
configuration.setProperty( Environment.GENERATE_STATISTICS, true );
configuration.setProperty( Environment.STATEMENT_BATCH_SIZE, 0 );
}
}

View File

@ -48,8 +48,8 @@ public class HHH3949Test extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
// see HHH-3949 for further details ^^^^^
}

View File

@ -70,7 +70,7 @@ public class BidirectionalLazyTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
super.configure( configuration );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
}
@Test

View File

@ -50,8 +50,8 @@ public class LazyBasicFieldNotInitializedTest extends BaseCoreFunctionalTestCase
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
}
@Before

View File

@ -48,8 +48,8 @@ public class LazyCollectionDeletedTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
}
@Before

View File

@ -66,8 +66,8 @@ public class LazyCollectionLoadingTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
}
@Before

View File

@ -40,8 +40,8 @@ public class LazyLoadingAndInheritanceTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
}
@Before

View File

@ -49,8 +49,8 @@ public class LazyLoadingByEnhancerSetterTest extends BaseCoreFunctionalTestCase
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( Environment.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( Environment.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( Environment.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( Environment.ENABLE_LAZY_LOAD_NO_TRANS, true );
}
@Before

View File

@ -51,9 +51,9 @@ public class LazyLoadingIntegrationTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG.name() );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG );
}
@Before

View File

@ -60,8 +60,8 @@ public class LazyLoadingTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
}
@Before

View File

@ -45,7 +45,7 @@ public class ReferenceLoadedEnhancedEntityTest extends BaseCoreFunctionalTestCas
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.DEFAULT_BATCH_FETCH_SIZE, "10" );
configuration.setProperty( AvailableSettings.DEFAULT_BATCH_FETCH_SIZE, 10 );
}
@Test

View File

@ -49,8 +49,8 @@ public class LazyBasicFieldAccessTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
}
@Before

View File

@ -46,8 +46,8 @@ public class LazyBasicPropertyAccessTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
}
@Before

View File

@ -50,8 +50,8 @@ public class LazyInCacheTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
}
@Before

View File

@ -49,9 +49,9 @@ public class UninitializedAssociationsInCacheTest extends BaseCoreFunctionalTest
@Override
protected void configure(Configuration configuration) {
configuration.setProperty(AvailableSettings.USE_SECOND_LEVEL_CACHE, "true");
configuration.setProperty(AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "false");
configuration.setProperty( AvailableSettings.GENERATE_STATISTICS, "true" );
configuration.setProperty(AvailableSettings.USE_SECOND_LEVEL_CACHE, true);
configuration.setProperty(AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, false);
configuration.setProperty(AvailableSettings.GENERATE_STATISTICS, true);
}
@Override

View File

@ -48,8 +48,8 @@ public class UninitializedLazyBasicCacheTest extends BaseCoreFunctionalTestCase
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "true" );
configuration.setProperty( AvailableSettings.GENERATE_STATISTICS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, true );
configuration.setProperty( AvailableSettings.GENERATE_STATISTICS, true );
}
@Before

View File

@ -39,8 +39,8 @@ public class BasicAttributesLazyGroupTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
}
@Before

View File

@ -59,8 +59,8 @@ public class LazyGroupTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
sqlInterceptor = new SQLStatementInterceptor( configuration );
}

View File

@ -50,8 +50,8 @@ public class SimpleLazyGroupUpdateTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
}
@Before

View File

@ -49,7 +49,7 @@ public class BytecodeEnhancedLazyLoadingOnDeletedEntityTest
@Override
protected void configure(Configuration configuration) {
super.configure( configuration );
configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG.name() );
configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG );
}
@Override

View File

@ -62,8 +62,8 @@ public class InitFromCacheTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "true" );
configuration.setProperty( AvailableSettings.GENERATE_STATISTICS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, true );
configuration.setProperty( AvailableSettings.GENERATE_STATISTICS, true );
}
@Before

View File

@ -56,9 +56,9 @@ public class OnDemandLoadTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( AvailableSettings.GENERATE_STATISTICS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
configuration.setProperty( AvailableSettings.GENERATE_STATISTICS, true );
}
@Before

View File

@ -65,9 +65,9 @@ public class OnDemandLoadWithCollectionInDefaultFetchGroupFalseTest extends Base
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "false" );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, "true" );
configuration.setProperty( AvailableSettings.GENERATE_STATISTICS, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, false );
configuration.setProperty( AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS, true );
configuration.setProperty( AvailableSettings.GENERATE_STATISTICS, true );
}
@Override

View File

@ -41,8 +41,8 @@ public class ByteCodeEnhancedImmutableReferenceCacheTest extends BaseCoreFunctio
@Override
protected void configure(Configuration configuration) {
super.configure( configuration );
configuration.setProperty( AvailableSettings.USE_DIRECT_REFERENCE_CACHE_ENTRIES, "true" );
configuration.setProperty( AvailableSettings.USE_QUERY_CACHE, "true" );
configuration.setProperty( AvailableSettings.USE_DIRECT_REFERENCE_CACHE_ENTRIES, true );
configuration.setProperty( AvailableSettings.USE_QUERY_CACHE, true );
}
@Override

View File

@ -33,7 +33,7 @@ public class CacheAnnotationTests extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
super.configure( configuration );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "true" );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, true );
}
@Override

View File

@ -51,10 +51,10 @@ public class CollectionCacheEvictionTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( Environment.AUTO_EVICT_COLLECTION_CACHE, "true" );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, "true" );
cfg.setProperty( Environment.USE_QUERY_CACHE, "true" );
cfg.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG.name() );
cfg.setProperty( Environment.AUTO_EVICT_COLLECTION_CACHE, true );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, true );
cfg.setProperty( Environment.USE_QUERY_CACHE, true );
cfg.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG );
}
@Override

View File

@ -52,9 +52,9 @@ public class CollectionCacheEvictionWithoutMappedByTest extends BaseCoreFunction
@Override
protected void configure(Configuration cfg) {
cfg.setProperty( Environment.AUTO_EVICT_COLLECTION_CACHE, "true" );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, "true" );
cfg.setProperty( Environment.USE_QUERY_CACHE, "true" );
cfg.setProperty( Environment.AUTO_EVICT_COLLECTION_CACHE, true );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, true );
cfg.setProperty( Environment.USE_QUERY_CACHE, true );
}
private People createPeople() {

View File

@ -41,8 +41,8 @@ public class EnhancedProxyCacheTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( Environment.GENERATE_STATISTICS, "true" );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, "true" );
cfg.setProperty( Environment.GENERATE_STATISTICS, true );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, true );
}
@Override

View File

@ -36,9 +36,9 @@ public class EntityUpdateCacheModeIgnoreTest extends BaseCoreFunctionalTestCase
@Override
protected void configure(Configuration configuration) {
super.configure( configuration );
configuration.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "true");
configuration.setProperty(AvailableSettings.USE_QUERY_CACHE, "true");
configuration.setProperty(AvailableSettings.GENERATE_STATISTICS, "true");
configuration.setProperty(AvailableSettings.USE_SECOND_LEVEL_CACHE, true);
configuration.setProperty(AvailableSettings.USE_QUERY_CACHE, true);
configuration.setProperty(AvailableSettings.GENERATE_STATISTICS, true);
}
@Override

View File

@ -34,7 +34,7 @@ public class InsertedDataTest extends BaseCoreFunctionalTestCase {
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( Environment.CACHE_REGION_PREFIX, "" );
cfg.setProperty( Environment.GENERATE_STATISTICS, "true" );
cfg.setProperty( Environment.GENERATE_STATISTICS, true );
}
@Test

View File

@ -41,10 +41,10 @@ public class LockModeTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( Environment.AUTO_EVICT_COLLECTION_CACHE, "true" );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, "true" );
cfg.setProperty( Environment.USE_QUERY_CACHE, "true" );
cfg.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG.name() );
cfg.setProperty( Environment.AUTO_EVICT_COLLECTION_CACHE, true );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, true );
cfg.setProperty( Environment.USE_QUERY_CACHE, true );
cfg.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG );
}
@Override

View File

@ -47,10 +47,10 @@ public class ManyToManyCollectionCacheEvictionTest extends BaseCoreFunctionalTes
@Override
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( Environment.AUTO_EVICT_COLLECTION_CACHE, "true" );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, "true" );
cfg.setProperty( Environment.USE_QUERY_CACHE, "true" );
cfg.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG.name() );
cfg.setProperty( Environment.AUTO_EVICT_COLLECTION_CACHE, true );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, true );
cfg.setProperty( Environment.USE_QUERY_CACHE, true );
cfg.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG );
}
@Test

View File

@ -16,7 +16,7 @@ import static org.junit.Assert.assertFalse;
public class NoCachingRegionFactoryTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.CACHE_REGION_FACTORY, NoCachingRegionFactory.class.getName() );
configuration.setProperty( AvailableSettings.CACHE_REGION_FACTORY, NoCachingRegionFactory.class );
}
@Test

View File

@ -33,8 +33,8 @@ public class ReferenceCacheTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
super.configure( configuration );
configuration.setProperty( AvailableSettings.USE_DIRECT_REFERENCE_CACHE_ENTRIES, "true" );
configuration.setProperty( AvailableSettings.USE_QUERY_CACHE, "true" );
configuration.setProperty( AvailableSettings.USE_DIRECT_REFERENCE_CACHE_ENTRIES, true );
configuration.setProperty( AvailableSettings.USE_QUERY_CACHE, true );
}
@Override

View File

@ -53,8 +53,8 @@ public class RefreshUpdatedDataTest extends BaseCoreFunctionalTestCase {
cfg.setProperty( Environment.URL, "jdbc:h2:mem:db-mvcc;DB_CLOSE_DELAY=-1;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE" );
}
cfg.setProperty( Environment.CACHE_REGION_PREFIX, "" );
cfg.setProperty( Environment.GENERATE_STATISTICS, "true" );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, "true" );
cfg.setProperty( Environment.GENERATE_STATISTICS, true );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, true );
}
@Test

View File

@ -63,9 +63,9 @@ public class TransactionalConcurrencyCollectionCacheEvictionTest extends BaseCor
@Override
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( Environment.AUTO_EVICT_COLLECTION_CACHE, "true" );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, "true" );
cfg.setProperty( Environment.USE_QUERY_CACHE, "false" );
cfg.setProperty( Environment.AUTO_EVICT_COLLECTION_CACHE, true );
cfg.setProperty( Environment.USE_SECOND_LEVEL_CACHE, true );
cfg.setProperty( Environment.USE_QUERY_CACHE, false );
}
@Override

View File

@ -60,9 +60,9 @@ public class HHH13179Test extends BaseCoreFunctionalTestCase {
protected void configure(Configuration configuration) {
super.configure( configuration );
configuration.setProperty( AvailableSettings.SHOW_SQL, Boolean.TRUE.toString() );
configuration.setProperty( AvailableSettings.FORMAT_SQL, Boolean.TRUE.toString() );
configuration.setProperty( AvailableSettings.GENERATE_STATISTICS, "true" );
configuration.setProperty( AvailableSettings.SHOW_SQL, true );
configuration.setProperty( AvailableSettings.FORMAT_SQL, true );
configuration.setProperty( AvailableSettings.GENERATE_STATISTICS, true );
}
@Test

View File

@ -69,14 +69,14 @@ public class BatchVersionedDataConfigTest extends BaseUnitTestCase {
@Test
public void testBatchVersionedDataForDialectNotSettingBatchVersionedDataProperty() {
cfg.setProperty( AvailableSettings.DIALECT, H2Dialect.class.getName() );
cfg.setProperty( AvailableSettings.DIALECT, H2Dialect.class );
sessionFactory = cfg.buildSessionFactory();
assertThat( sessionFactory.getSessionFactoryOptions().isJdbcBatchVersionedData(), is( true ) );
}
@Test
public void testBatchVersionedDataForOracleDialect() {
cfg.setProperty( AvailableSettings.DIALECT, OracleDialect.class.getName() );
cfg.setProperty( AvailableSettings.DIALECT, OracleDialect.class );
sessionFactory = cfg.buildSessionFactory();
assertThat( sessionFactory.getSessionFactoryOptions().isJdbcBatchVersionedData(), is( true ) );
@ -84,8 +84,8 @@ public class BatchVersionedDataConfigTest extends BaseUnitTestCase {
@Test
public void testBatchVersionedDataForOracle10gDialect() {
cfg.setProperty( AvailableSettings.DIALECT, OracleLegacyDialect.class.getName() );
cfg.setProperty( AvailableSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION, "10" );
cfg.setProperty( AvailableSettings.DIALECT, OracleLegacyDialect.class );
cfg.setProperty( AvailableSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION, 10 );
sessionFactory = cfg.buildSessionFactory();
assertThat( sessionFactory.getSessionFactoryOptions().isJdbcBatchVersionedData(), is( false ) );
@ -93,8 +93,8 @@ public class BatchVersionedDataConfigTest extends BaseUnitTestCase {
@Test
public void testBatchVersionedDataForOracle8iDialect() {
cfg.setProperty( AvailableSettings.DIALECT, OracleLegacyDialect.class.getName() );
cfg.setProperty( AvailableSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION, "8" );
cfg.setProperty( AvailableSettings.DIALECT, OracleLegacyDialect.class );
cfg.setProperty( AvailableSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION, 8 );
sessionFactory = cfg.buildSessionFactory();
assertThat( sessionFactory.getSessionFactoryOptions().isJdbcBatchVersionedData(), is( false ) );
@ -102,8 +102,8 @@ public class BatchVersionedDataConfigTest extends BaseUnitTestCase {
@Test
public void testBatchVersionedDataForOracle9iDialect() {
cfg.setProperty( AvailableSettings.DIALECT, OracleLegacyDialect.class.getName() );
cfg.setProperty( AvailableSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION, "9" );
cfg.setProperty( AvailableSettings.DIALECT, OracleLegacyDialect.class );
cfg.setProperty( AvailableSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION, 9 );
sessionFactory = cfg.buildSessionFactory();
assertThat( sessionFactory.getSessionFactoryOptions().isJdbcBatchVersionedData(), is( false ) );
@ -111,8 +111,8 @@ public class BatchVersionedDataConfigTest extends BaseUnitTestCase {
@Test
public void testBatchVersionedDataForOracle12cDialect() {
cfg.setProperty( AvailableSettings.DIALECT, OracleLegacyDialect.class.getName() );
cfg.setProperty( AvailableSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION, "12" );
cfg.setProperty( AvailableSettings.DIALECT, OracleLegacyDialect.class );
cfg.setProperty( AvailableSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION, 12 );
sessionFactory = cfg.buildSessionFactory();
assertThat( sessionFactory.getSessionFactoryOptions().isJdbcBatchVersionedData(), is( true ) );

View File

@ -34,7 +34,7 @@ public class DirectReferenceCacheEntriesTest extends BaseCoreFunctionalTestCase
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.USE_DIRECT_REFERENCE_CACHE_ENTRIES, "true" );
configuration.setProperty( AvailableSettings.USE_DIRECT_REFERENCE_CACHE_ENTRIES, true );
}
@Before

View File

@ -37,7 +37,7 @@ public class OrderByEmbeddableToOneTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
super.configure( configuration );
configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG.name() );
configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG );
}
@Test

View File

@ -37,7 +37,7 @@ public class OrderByEmbeddableX2Test extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
super.configure( configuration );
configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG.name() );
configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG );
}
@Test

View File

@ -29,7 +29,7 @@ public class BadMergeHandlingTest extends BaseCoreFunctionalTestCase {
protected void configure(Configuration configuration) {
super.configure( configuration );
configuration.setImplicitNamingStrategy( ImplicitNamingStrategyLegacyJpaImpl.INSTANCE );
configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG.name() );
configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG );
}
@Override

View File

@ -41,7 +41,7 @@ public class MergeCollectionEventTest extends BaseCoreFunctionalTestCase {
protected void configure(Configuration configuration) {
super.configure( configuration );
configuration.setImplicitNamingStrategy( ImplicitNamingStrategyLegacyJpaImpl.INSTANCE );
configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG.name() );
configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG );
}
private AggregatedCollectionEventListener.IntegratorImpl collectionListenerIntegrator =

View File

@ -28,7 +28,7 @@ public class OneToOneOwnerByContainedEagerCyclesTest extends BaseCoreFunctionalT
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.MAX_FETCH_DEPTH, "2" );
configuration.setProperty( AvailableSettings.MAX_FETCH_DEPTH, 2 );
}
@Test

View File

@ -50,8 +50,8 @@ public class CollectionLoadedInTwoPhaseLoadTest extends BaseCoreFunctionalTestCa
private final String P_2 = "p_2";
public void configure(Configuration cfg) {
cfg.setProperty( Environment.GENERATE_STATISTICS, "true" );
cfg.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG.name() );
cfg.setProperty( Environment.GENERATE_STATISTICS, true );
cfg.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG );
}
@Test

View File

@ -34,7 +34,7 @@ public class EntityLoadedInTwoPhaseLoadTest extends BaseCoreFunctionalTestCase {
static final String FETCH_PROFILE_NAME = "fp1";
public void configure(Configuration cfg) {
cfg.setProperty( Environment.GENERATE_STATISTICS, "true" );
cfg.setProperty( Environment.GENERATE_STATISTICS, true );
}
@Test

View File

@ -47,7 +47,7 @@ public class JoinFetchProfileTest extends BaseCoreFunctionalTestCase {
}
public void configure(Configuration cfg) {
cfg.setProperty( Environment.GENERATE_STATISTICS, "true" );
cfg.setProperty( Environment.GENERATE_STATISTICS, true );
}
@SuppressWarnings({ "UnusedDeclaration" })

View File

@ -26,7 +26,7 @@ import org.junit.Test;
public class TestClearBatchFetchQueueAfterFlush extends BaseCoreFunctionalTestCase {
public void configure(Configuration cfg) {
cfg.setProperty( Environment.DEFAULT_BATCH_FETCH_SIZE, "10" );
cfg.setProperty( Environment.DEFAULT_BATCH_FETCH_SIZE, 10 );
}
@Test

View File

@ -33,7 +33,7 @@ public class IdentityGeneratedKeysTest extends BaseCoreFunctionalTestCase {
@Override
public void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( Environment.GENERATE_STATISTICS, "true" );
cfg.setProperty( Environment.GENERATE_STATISTICS, true );
}
@Override

View File

@ -37,7 +37,7 @@ public class NamedQueryTest extends BaseUnitTestCase {
@Test
public void testQuery() {
Configuration cfg = new Configuration();
cfg.setProperty( "hibernate.temp.use_jdbc_metadata_defaults", "false" );
cfg.setProperty( "hibernate.temp.use_jdbc_metadata_defaults", false );
cfg.addInputStream( new ReaderInputStream( new StringReader( NAMED_QUERY_HBM_XML ) ) );
ServiceRegistryUtil.applySettings( cfg.getStandardServiceRegistryBuilder() );
SessionFactory sessionFactory = cfg.buildSessionFactory();

View File

@ -48,7 +48,7 @@ public class QueryReturnTest extends BaseUnitTestCase {
@Test
public void testQueryReturn() {
Configuration cfg = new Configuration();
cfg.setProperty( "hibernate.temp.use_jdbc_metadata_defaults", "false" );
cfg.setProperty( "hibernate.temp.use_jdbc_metadata_defaults", false );
cfg.addInputStream( new ReaderInputStream( new StringReader( QUERY_RETURN_HBM_XML ) ) );
ServiceRegistryUtil.applySettings( cfg.getStandardServiceRegistryBuilder() );
SessionFactoryImplementor sessionFactory = (SessionFactoryImplementor) cfg.buildSessionFactory();

View File

@ -231,8 +231,8 @@ public class ASTParserLoadingTest extends BaseCoreFunctionalTestCase {
@Override
public void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( Environment.USE_QUERY_CACHE, "true" );
cfg.setProperty( Environment.GENERATE_STATISTICS, "true" );
cfg.setProperty( Environment.USE_QUERY_CACHE, true );
cfg.setProperty( Environment.GENERATE_STATISTICS, true );
}
@Test

View File

@ -52,7 +52,7 @@ public class FunctionNameAsColumnTest extends BaseCoreFunctionalTestCase {
@Override
public void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( Environment.USE_QUERY_CACHE, "false" );
cfg.setProperty( Environment.USE_QUERY_CACHE, false );
}
@Test

View File

@ -48,8 +48,8 @@ public class AlternativeToRepeatedTableTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
super.configure(configuration);
configuration.setProperty(SHOW_SQL, Boolean.toString(true));
configuration.setProperty(FORMAT_SQL, Boolean.toString(true));
configuration.setProperty(SHOW_SQL, true);
configuration.setProperty(FORMAT_SQL, true);
}
@Test

View File

@ -44,8 +44,8 @@ public class RepeatedSubclassTableTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
super.configure(configuration);
configuration.setProperty(SHOW_SQL, Boolean.toString(true));
configuration.setProperty(FORMAT_SQL, Boolean.toString(true));
configuration.setProperty(SHOW_SQL, true);
configuration.setProperty(FORMAT_SQL, true);
}
@Test

View File

@ -35,8 +35,8 @@ public class RepeatedTableTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
super.configure(configuration);
configuration.setProperty(SHOW_SQL, Boolean.toString(true));
configuration.setProperty(FORMAT_SQL, Boolean.toString(true));
configuration.setProperty(SHOW_SQL, true);
configuration.setProperty(FORMAT_SQL, true);
}
@Test

View File

@ -28,7 +28,7 @@ public class TableGeneratorVisibilityTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty( AvailableSettings.JPA_ID_GENERATOR_GLOBAL_SCOPE_COMPLIANCE, "true" );
configuration.setProperty( AvailableSettings.JPA_ID_GENERATOR_GLOBAL_SCOPE_COMPLIANCE, true );
}
@Override

View File

@ -36,9 +36,9 @@ public class MultiLoadSecondLlvCacheTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration
.setProperty( AvailableSettings.JAKARTA_SHARED_CACHE_MODE, SharedCacheMode.ALL.name() )
.setProperty( AvailableSettings.GENERATE_STATISTICS, "true" )
.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "true" );
.setProperty( AvailableSettings.JAKARTA_SHARED_CACHE_MODE, SharedCacheMode.ALL )
.setProperty( AvailableSettings.GENERATE_STATISTICS, true )
.setProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, true );
}
@Test

View File

@ -41,10 +41,7 @@ public class FormulaWithColumnTypesTest extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration configuration) {
configuration.setProperty(
Environment.DIALECT,
ExtendedDialect.class.getName()
);
configuration.setProperty( Environment.DIALECT, ExtendedDialect.class );
}
@Test

View File

@ -46,7 +46,7 @@ public class HHH9965Test extends BaseCoreFunctionalTestCase {
@Override
protected void configure(Configuration cfg) {
super.configure(cfg);
cfg.setProperty( Environment.FAIL_ON_PAGINATION_OVER_COLLECTION_FETCH, "true");
cfg.setProperty( Environment.FAIL_ON_PAGINATION_OVER_COLLECTION_FETCH, true );
}
@Override

View File

@ -48,7 +48,7 @@ public class MultipleSessionFactoriesProxyTest extends BaseCoreFunctionalTestCas
public void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( Environment.SESSION_FACTORY_NAME, "sf-name" ); // explicitly define the session factory name
cfg.setProperty( Environment.SESSION_FACTORY_NAME_IS_JNDI, "false" ); // do not bind it to jndi
cfg.setProperty( Environment.SESSION_FACTORY_NAME_IS_JNDI, false ); // do not bind it to jndi
}
@Test

View File

@ -51,7 +51,7 @@ public class ProxyTest extends BaseCoreFunctionalTestCase {
@Override
public void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( Environment.STATEMENT_BATCH_SIZE, "0" ); // problem on HSQLDB (go figure)
cfg.setProperty( Environment.STATEMENT_BATCH_SIZE, 0 ); // problem on HSQLDB (go figure)
}
@Test

Some files were not shown because too many files have changed in this diff Show More