From 2558f9843a57ed213eb67ea97bb254df9aeaabea Mon Sep 17 00:00:00 2001 From: Gavin King Date: Sat, 17 Feb 2024 11:27:09 +0100 Subject: [PATCH] HHH-17746 update tests to use streamlined API --- .../OracleSQLCallableStatementProxyTest.java | 2 +- .../SkipLoadingSequenceInformationTest.java | 4 ++-- .../BeanValidationAutoTest.java | 4 +++- .../BeanValidationProvidedFactoryTest.java | 7 +++++-- .../HibernateTraversableResolverTest.java | 4 +++- .../MergeNotNullCollectionTest.java | 5 ++++- ...rgeNotNullCollectionUsingIdentityTest.java | 5 ++++- .../embeddables/EmbeddableIntegratorTest.java | 5 +++-- .../orm/test/annotations/lob/ImageTest.java | 2 +- .../ManyToManyMaxFetchDepth0Test.java | 2 +- .../manytomany/ManyToManyTest.java | 2 +- .../manytoone/NotNullManyToOneTest.java | 2 +- .../ImmutableNaturalKeyLookupTest.java | 4 ++-- .../annotations/naturalid/NaturalIdTest.java | 3 ++- .../onetomany/DefaultNullOrderingTest.java | 3 ++- .../annotations/onetomany/OrderByTest.java | 5 +++-- .../onetoone/hhh4851/HHH4851Test.java | 2 +- .../ExplicitSqlResultSetMappingTest.java | 2 +- .../hibernate/orm/test/batch/BatchTest.java | 2 +- .../test/batch/BatchingBatchFailureTest.java | 4 ++-- .../batch/BatchingInheritanceDeleteTest.java | 2 +- .../batch/NonBatchingBatchFailureTest.java | 4 ++-- ...stractMutationStrategyCompositeIdTest.java | 2 +- .../AbstractMutationStrategyIdTest.java | 2 +- ...OnEnhancedEntityLoadedAsReferenceTest.java | 4 ++-- .../batch/BatchEntityOneToManyTest.java | 2 +- ...hEntityOneToManyWithDisabledProxyTest.java | 2 +- .../batch/BatchEntityWithSelectFetchTest.java | 2 +- ...tyWithSelectFetchWithDisableProxyTest.java | 2 +- .../cache/AbstractManyToOneNoProxyTest.java | 2 +- .../cache/ManyToOneNoProxyTest.java | 2 +- .../enhancement/cache/ManyToOneTest.java | 2 +- .../cache/ManyToOneTestReusedColumn.java | 2 +- ...ascadeCheckNullFalseDelayedInsertTest.java | 6 +++--- ...CascadeCheckNullTrueDelayedInsertTest.java | 6 +++--- ...ircleCascadeCheckNullibilityFalseTest.java | 6 +++--- ...CircleCascadeCheckNullibilityTrueTest.java | 6 +++--- ...ltiPathCircleCascadeDelayedInsertTest.java | 4 ++-- .../circle/MultiPathCircleCascadeTest.java | 4 ++-- .../enhancement/join/HHH3949Test.java | 4 ++-- .../lazy/BidirectionalLazyTest.java | 2 +- .../LazyBasicFieldNotInitializedTest.java | 4 ++-- .../lazy/LazyCollectionDeletedTest.java | 4 ++-- .../lazy/LazyCollectionLoadingTest.java | 4 ++-- .../lazy/LazyLoadingAndInheritanceTest.java | 4 ++-- .../lazy/LazyLoadingByEnhancerSetterTest.java | 4 ++-- .../lazy/LazyLoadingIntegrationTest.java | 6 +++--- .../enhancement/lazy/LazyLoadingTest.java | 4 ++-- .../ReferenceLoadedEnhancedEntityTest.java | 2 +- .../lazy/basic/LazyBasicFieldAccessTest.java | 4 ++-- .../basic/LazyBasicPropertyAccessTest.java | 4 ++-- .../lazy/cache/LazyInCacheTest.java | 4 ++-- .../UninitializedAssociationsInCacheTest.java | 6 +++--- .../UninitializedLazyBasicCacheTest.java | 4 ++-- .../group/BasicAttributesLazyGroupTest.java | 4 ++-- .../enhancement/lazy/group/LazyGroupTest.java | 4 ++-- .../lazy/group/SimpleLazyGroupUpdateTest.java | 4 ++-- ...nhancedLazyLoadingOnDeletedEntityTest.java | 2 +- .../lazyCache/InitFromCacheTest.java | 4 ++-- .../ondemandload/OnDemandLoadTest.java | 6 +++--- ...ollectionInDefaultFetchGroupFalseTest.java | 6 +++--- ...deEnhancedImmutableReferenceCacheTest.java | 4 ++-- .../orm/test/cache/CacheAnnotationTests.java | 2 +- .../cache/CollectionCacheEvictionTest.java | 8 ++++---- ...ctionCacheEvictionWithoutMappedByTest.java | 6 +++--- .../test/cache/EnhancedProxyCacheTest.java | 4 ++-- .../EntityUpdateCacheModeIgnoreTest.java | 6 +++--- .../orm/test/cache/InsertedDataTest.java | 2 +- .../orm/test/cache/LockModeTest.java | 8 ++++---- ...ManyToManyCollectionCacheEvictionTest.java | 8 ++++---- .../cache/NoCachingRegionFactoryTest.java | 2 +- .../orm/test/cache/ReferenceCacheTest.java | 4 ++-- .../test/cache/RefreshUpdatedDataTest.java | 4 ++-- ...oncurrencyCollectionCacheEvictionTest.java | 6 +++--- .../orm/test/cache/hhh13179/HHH13179Test.java | 6 +++--- .../cfg/BatchVersionedDataConfigTest.java | 20 +++++++++---------- .../DirectReferenceCacheEntriesTest.java | 2 +- .../OrderByEmbeddableToOneTest.java | 2 +- .../embeddable/OrderByEmbeddableX2Test.java | 2 +- .../detached/BadMergeHandlingTest.java | 2 +- .../detached/MergeCollectionEventTest.java | 2 +- ...eToOneOwnerByContainedEagerCyclesTest.java | 2 +- .../CollectionLoadedInTwoPhaseLoadTest.java | 4 ++-- .../EntityLoadedInTwoPhaseLoadTest.java | 2 +- .../join/JoinFetchProfileTest.java | 2 +- .../TestClearBatchFetchQueueAfterFlush.java | 2 +- .../identity/IdentityGeneratedKeysTest.java | 2 +- .../orm/test/hbm/query/NamedQueryTest.java | 2 +- .../orm/test/hbm/query/QueryReturnTest.java | 2 +- .../orm/test/hql/ASTParserLoadingTest.java | 4 ++-- .../test/hql/FunctionNameAsColumnTest.java | 2 +- .../AlternativeToRepeatedTableTest.java | 4 ++-- .../RepeatedSubclassTableTest.java | 4 ++-- .../repeatedtable/RepeatedTableTest.java | 4 ++-- .../tck2_2/TableGeneratorVisibilityTest.java | 2 +- .../MultiLoadSecondLlvCacheTest.java | 6 +++--- .../formula/FormulaWithColumnTypesTest.java | 5 +---- .../test/pagination/hhh9965/HHH9965Test.java | 2 +- .../MultipleSessionFactoriesProxyTest.java | 2 +- .../hibernate/orm/test/proxy/ProxyTest.java | 2 +- .../hhh13151/TreatedEntityFetchTest.java | 4 ++-- .../orm/test/query/hql/OrderByTests.java | 4 ++-- .../CacheKeySerializationTest.java | 13 +++++++----- ...roxySerializationNoSessionFactoryTest.java | 3 ++- .../SessionFactorySerializationTest.java | 4 ++-- .../SubclassProxyInterfaceTest.java | 2 +- .../orm/test/ternary/TernaryTest.java | 2 +- .../orm/test/type/OffsetDateTimeTest.java | 2 +- .../orm/test/type/OffsetTimeTest.java | 2 +- .../orm/test/type/ZonedDateTimeTest.java | 2 +- .../orm/test/unidir/BackrefTest.java | 2 +- .../test/uniquekey/NaturalIdCachingTest.java | 4 ++-- .../LazyManyToManyNonUniqueIdWhereTest.java | 2 +- .../LazyOneToManyNonUniqueIdWhereTest.java | 2 +- 114 files changed, 221 insertions(+), 203 deletions(-) diff --git a/hibernate-c3p0/src/test/java/org/hibernate/test/c3p0/OracleSQLCallableStatementProxyTest.java b/hibernate-c3p0/src/test/java/org/hibernate/test/c3p0/OracleSQLCallableStatementProxyTest.java index 28a4b0ebd1..6d2f8cc62e 100644 --- a/hibernate-c3p0/src/test/java/org/hibernate/test/c3p0/OracleSQLCallableStatementProxyTest.java +++ b/hibernate-c3p0/src/test/java/org/hibernate/test/c3p0/OracleSQLCallableStatementProxyTest.java @@ -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 ); } diff --git a/hibernate-core/src/test/java/org/hibernate/engine/jdbc/env/internal/SkipLoadingSequenceInformationTest.java b/hibernate-core/src/test/java/org/hibernate/engine/jdbc/env/internal/SkipLoadingSequenceInformationTest.java index bfdb4bb0a9..ea6bc7cc54 100644 --- a/hibernate-core/src/test/java/org/hibernate/engine/jdbc/env/internal/SkipLoadingSequenceInformationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/engine/jdbc/env/internal/SkipLoadingSequenceInformationTest.java @@ -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") diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/BeanValidationAutoTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/BeanValidationAutoTest.java index a26f8a37e9..310ed68498 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/BeanValidationAutoTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/BeanValidationAutoTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/BeanValidationProvidedFactoryTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/BeanValidationProvidedFactoryTest.java index 60230d3c02..d15234694c 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/BeanValidationProvidedFactoryTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/BeanValidationProvidedFactoryTest.java @@ -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 ); } } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/HibernateTraversableResolverTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/HibernateTraversableResolverTest.java index 0493460fee..96c904f627 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/HibernateTraversableResolverTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/HibernateTraversableResolverTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/MergeNotNullCollectionTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/MergeNotNullCollectionTest.java index 3f4046e4ff..04a1c834b1 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/MergeNotNullCollectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/MergeNotNullCollectionTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/MergeNotNullCollectionUsingIdentityTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/MergeNotNullCollectionUsingIdentityTest.java index 17ea7aff93..3cf5070c12 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/MergeNotNullCollectionUsingIdentityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/MergeNotNullCollectionUsingIdentityTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/embeddables/EmbeddableIntegratorTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/embeddables/EmbeddableIntegratorTest.java index a7bd61a38a..e1719eb2bf 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/embeddables/EmbeddableIntegratorTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/embeddables/EmbeddableIntegratorTest.java @@ -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 { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/lob/ImageTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/lob/ImageTest.java index 7a0c26f460..d64c3590c7 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/lob/ImageTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/lob/ImageTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytomany/ManyToManyMaxFetchDepth0Test.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytomany/ManyToManyMaxFetchDepth0Test.java index 975c4bf8e0..94b49a4d32 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytomany/ManyToManyMaxFetchDepth0Test.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytomany/ManyToManyMaxFetchDepth0Test.java @@ -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 ); } } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytomany/ManyToManyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytomany/ManyToManyTest.java index b88f8401f3..d696080002 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytomany/ManyToManyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytomany/ManyToManyTest.java @@ -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 ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytoone/NotNullManyToOneTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytoone/NotNullManyToOneTest.java index d175ec3d6e..5c0ddff4f1 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytoone/NotNullManyToOneTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytoone/NotNullManyToOneTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/naturalid/ImmutableNaturalKeyLookupTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/naturalid/ImmutableNaturalKeyLookupTest.java index 9602a0b540..6718b0434a 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/naturalid/ImmutableNaturalKeyLookupTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/naturalid/ImmutableNaturalKeyLookupTest.java @@ -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 ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/naturalid/NaturalIdTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/naturalid/NaturalIdTest.java index e677c2f294..44aa231787 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/naturalid/NaturalIdTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/naturalid/NaturalIdTest.java @@ -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 ); } } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/onetomany/DefaultNullOrderingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/onetomany/DefaultNullOrderingTest.java index 0c3408b43f..2ebd18619f 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/onetomany/DefaultNullOrderingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/onetomany/DefaultNullOrderingTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/onetomany/OrderByTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/onetomany/OrderByTest.java index 6e0e04aef3..21cc1178e1 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/onetomany/OrderByTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/onetomany/OrderByTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/onetoone/hhh4851/HHH4851Test.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/onetoone/hhh4851/HHH4851Test.java index 85cd0dfa92..1a1c8a2538 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/onetoone/hhh4851/HHH4851Test.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/onetoone/hhh4851/HHH4851Test.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/quote/resultsetmappings/ExplicitSqlResultSetMappingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/quote/resultsetmappings/ExplicitSqlResultSetMappingTest.java index 468ef31c15..76abdf3b41 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/quote/resultsetmappings/ExplicitSqlResultSetMappingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/quote/resultsetmappings/ExplicitSqlResultSetMappingTest.java @@ -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() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchTest.java index 8360958e7c..debdfbd553 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchingBatchFailureTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchingBatchFailureTest.java index 28c5c2d6c9..bccdf8be69 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchingBatchFailureTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchingBatchFailureTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchingInheritanceDeleteTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchingInheritanceDeleteTest.java index 2155f4a696..d9512f092f 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchingInheritanceDeleteTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchingInheritanceDeleteTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/batch/NonBatchingBatchFailureTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/batch/NonBatchingBatchFailureTest.java index fbdd9129e9..14887fd0cc 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/batch/NonBatchingBatchFailureTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/batch/NonBatchingBatchFailureTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bulkid/AbstractMutationStrategyCompositeIdTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bulkid/AbstractMutationStrategyCompositeIdTest.java index 0d84d5df8a..044d56e521 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bulkid/AbstractMutationStrategyCompositeIdTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bulkid/AbstractMutationStrategyCompositeIdTest.java @@ -37,7 +37,7 @@ public abstract class AbstractMutationStrategyCompositeIdTest extends BaseCoreFu super.configure( configuration ); Class strategyClass = getMultiTableBulkIdStrategyClass(); if ( strategyClass != null ) { - configuration.setProperty( AvailableSettings.QUERY_MULTI_TABLE_MUTATION_STRATEGY, strategyClass.getName() ); + configuration.setProperty( AvailableSettings.QUERY_MULTI_TABLE_MUTATION_STRATEGY, strategyClass ); } } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bulkid/AbstractMutationStrategyIdTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bulkid/AbstractMutationStrategyIdTest.java index f5a092d66c..c3b6c9265d 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bulkid/AbstractMutationStrategyIdTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bulkid/AbstractMutationStrategyIdTest.java @@ -38,7 +38,7 @@ public abstract class AbstractMutationStrategyIdTest extends BaseCoreFunctionalT if ( multiTableBulkIdStrategyClass != null ) { configuration.setProperty( AvailableSettings.QUERY_MULTI_TABLE_MUTATION_STRATEGY, - multiTableBulkIdStrategyClass.getName() + multiTableBulkIdStrategyClass ); } } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/association/OneToOnEnhancedEntityLoadedAsReferenceTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/association/OneToOnEnhancedEntityLoadedAsReferenceTest.java index 2372733f8e..0c704821f2 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/association/OneToOnEnhancedEntityLoadedAsReferenceTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/association/OneToOnEnhancedEntityLoadedAsReferenceTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityOneToManyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityOneToManyTest.java index 9ecf65e997..35fe560916 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityOneToManyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityOneToManyTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityOneToManyWithDisabledProxyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityOneToManyWithDisabledProxyTest.java index bb1d6ea111..104f5a155d 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityOneToManyWithDisabledProxyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityOneToManyWithDisabledProxyTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityWithSelectFetchTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityWithSelectFetchTest.java index b8c492fc5e..0f63ad71fa 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityWithSelectFetchTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityWithSelectFetchTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityWithSelectFetchWithDisableProxyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityWithSelectFetchWithDisableProxyTest.java index 32626bb731..b2e85caf14 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityWithSelectFetchWithDisableProxyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/batch/BatchEntityWithSelectFetchWithDisableProxyTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/AbstractManyToOneNoProxyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/AbstractManyToOneNoProxyTest.java index edeef46d24..c874171ddd 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/AbstractManyToOneNoProxyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/AbstractManyToOneNoProxyTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/ManyToOneNoProxyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/ManyToOneNoProxyTest.java index 6200341222..d3b6211b10 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/ManyToOneNoProxyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/ManyToOneNoProxyTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/ManyToOneTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/ManyToOneTest.java index 23e37ff515..aa0a8d7980 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/ManyToOneTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/ManyToOneTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/ManyToOneTestReusedColumn.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/ManyToOneTestReusedColumn.java index d834cf38d0..1a5d7de61d 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/ManyToOneTestReusedColumn.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cache/ManyToOneTestReusedColumn.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullFalseDelayedInsertTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullFalseDelayedInsertTest.java index c72b472e67..35104fbc4e 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullFalseDelayedInsertTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullFalseDelayedInsertTest.java @@ -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 ); } } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullTrueDelayedInsertTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullTrueDelayedInsertTest.java index 83956a98a1..8e994c4303 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullTrueDelayedInsertTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullTrueDelayedInsertTest.java @@ -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 ); } } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullibilityFalseTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullibilityFalseTest.java index 86d444abbc..4908532c7a 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullibilityFalseTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullibilityFalseTest.java @@ -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 ); } } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullibilityTrueTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullibilityTrueTest.java index f75b38af0b..cb55545581 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullibilityTrueTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeCheckNullibilityTrueTest.java @@ -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 ); } } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeDelayedInsertTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeDelayedInsertTest.java index f4e8ced324..789b899e83 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeDelayedInsertTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeDelayedInsertTest.java @@ -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 ); } } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeTest.java index 15a3ecc963..1c9199562d 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/circle/MultiPathCircleCascadeTest.java @@ -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 ); } } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/join/HHH3949Test.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/join/HHH3949Test.java index 41a013c7f4..c659f81335 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/join/HHH3949Test.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/join/HHH3949Test.java @@ -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 ^^^^^ } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/BidirectionalLazyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/BidirectionalLazyTest.java index 65aa515e18..36eff7fc90 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/BidirectionalLazyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/BidirectionalLazyTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyBasicFieldNotInitializedTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyBasicFieldNotInitializedTest.java index da87f8f169..03b949174f 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyBasicFieldNotInitializedTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyBasicFieldNotInitializedTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyCollectionDeletedTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyCollectionDeletedTest.java index 9887834e5c..2485067066 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyCollectionDeletedTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyCollectionDeletedTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyCollectionLoadingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyCollectionLoadingTest.java index cc7e13ddfe..04eeec043e 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyCollectionLoadingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyCollectionLoadingTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingAndInheritanceTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingAndInheritanceTest.java index ec321e4514..0bf43430c7 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingAndInheritanceTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingAndInheritanceTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingByEnhancerSetterTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingByEnhancerSetterTest.java index dd4b55ac6f..c44ae28cc8 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingByEnhancerSetterTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingByEnhancerSetterTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingIntegrationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingIntegrationTest.java index f8a0d666ee..b4f23740ff 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingIntegrationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingIntegrationTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingTest.java index d7d819aff0..01fe0e4ab8 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/ReferenceLoadedEnhancedEntityTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/ReferenceLoadedEnhancedEntityTest.java index 4e6645ead7..f47ee952d1 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/ReferenceLoadedEnhancedEntityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/ReferenceLoadedEnhancedEntityTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/basic/LazyBasicFieldAccessTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/basic/LazyBasicFieldAccessTest.java index 08579d956a..ff03959b4d 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/basic/LazyBasicFieldAccessTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/basic/LazyBasicFieldAccessTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/basic/LazyBasicPropertyAccessTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/basic/LazyBasicPropertyAccessTest.java index 3f627ca869..c6871b3330 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/basic/LazyBasicPropertyAccessTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/basic/LazyBasicPropertyAccessTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/cache/LazyInCacheTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/cache/LazyInCacheTest.java index dc69c38624..ba02f7b319 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/cache/LazyInCacheTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/cache/LazyInCacheTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/cache/UninitializedAssociationsInCacheTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/cache/UninitializedAssociationsInCacheTest.java index 5c7b7f158e..71caa0b2b7 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/cache/UninitializedAssociationsInCacheTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/cache/UninitializedAssociationsInCacheTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/cache/UninitializedLazyBasicCacheTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/cache/UninitializedLazyBasicCacheTest.java index 5c73ab7c67..ca759ff258 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/cache/UninitializedLazyBasicCacheTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/cache/UninitializedLazyBasicCacheTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/group/BasicAttributesLazyGroupTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/group/BasicAttributesLazyGroupTest.java index 42c0ee808d..27f04f42c2 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/group/BasicAttributesLazyGroupTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/group/BasicAttributesLazyGroupTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/group/LazyGroupTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/group/LazyGroupTest.java index 048c02099d..0618297178 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/group/LazyGroupTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/group/LazyGroupTest.java @@ -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 ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/group/SimpleLazyGroupUpdateTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/group/SimpleLazyGroupUpdateTest.java index 973041aad8..f38da7020b 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/group/SimpleLazyGroupUpdateTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/group/SimpleLazyGroupUpdateTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/BytecodeEnhancedLazyLoadingOnDeletedEntityTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/BytecodeEnhancedLazyLoadingOnDeletedEntityTest.java index d8036cc377..b1862471b6 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/BytecodeEnhancedLazyLoadingOnDeletedEntityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/BytecodeEnhancedLazyLoadingOnDeletedEntityTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazyCache/InitFromCacheTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazyCache/InitFromCacheTest.java index ff33537c92..38efc75bdf 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazyCache/InitFromCacheTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazyCache/InitFromCacheTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/ondemandload/OnDemandLoadTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/ondemandload/OnDemandLoadTest.java index cb0791e970..e40a185318 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/ondemandload/OnDemandLoadTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/ondemandload/OnDemandLoadTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/ondemandload/OnDemandLoadWithCollectionInDefaultFetchGroupFalseTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/ondemandload/OnDemandLoadWithCollectionInDefaultFetchGroupFalseTest.java index 0e55fb4540..79603f7f3d 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/ondemandload/OnDemandLoadWithCollectionInDefaultFetchGroupFalseTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/ondemandload/OnDemandLoadWithCollectionInDefaultFetchGroupFalseTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/ByteCodeEnhancedImmutableReferenceCacheTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/ByteCodeEnhancedImmutableReferenceCacheTest.java index f7d6bf9ee1..fd5ecf9a16 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/ByteCodeEnhancedImmutableReferenceCacheTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/ByteCodeEnhancedImmutableReferenceCacheTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/CacheAnnotationTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/CacheAnnotationTests.java index 2cade21a07..c1b110ccf6 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/CacheAnnotationTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/CacheAnnotationTests.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/CollectionCacheEvictionTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/CollectionCacheEvictionTest.java index 4ab5af830a..2be94c6522 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/CollectionCacheEvictionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/CollectionCacheEvictionTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/CollectionCacheEvictionWithoutMappedByTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/CollectionCacheEvictionWithoutMappedByTest.java index e32c2fa7d6..0ed730c6a0 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/CollectionCacheEvictionWithoutMappedByTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/CollectionCacheEvictionWithoutMappedByTest.java @@ -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() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/EnhancedProxyCacheTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/EnhancedProxyCacheTest.java index d93bf041b4..ff61caee9d 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/EnhancedProxyCacheTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/EnhancedProxyCacheTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/EntityUpdateCacheModeIgnoreTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/EntityUpdateCacheModeIgnoreTest.java index b558b384cf..7b8c394c9a 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/EntityUpdateCacheModeIgnoreTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/EntityUpdateCacheModeIgnoreTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/InsertedDataTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/InsertedDataTest.java index d9ffdcd047..90515da760 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/InsertedDataTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/InsertedDataTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/LockModeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/LockModeTest.java index 87f73ed3d8..c27fddffbe 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/LockModeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/LockModeTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/ManyToManyCollectionCacheEvictionTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/ManyToManyCollectionCacheEvictionTest.java index dc23c500e9..deabc9c92b 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/ManyToManyCollectionCacheEvictionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/ManyToManyCollectionCacheEvictionTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/NoCachingRegionFactoryTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/NoCachingRegionFactoryTest.java index 9ba8ad3eed..fbeb3a89fd 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/NoCachingRegionFactoryTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/NoCachingRegionFactoryTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/ReferenceCacheTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/ReferenceCacheTest.java index 05b13249d0..3b20182598 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/ReferenceCacheTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/ReferenceCacheTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/RefreshUpdatedDataTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/RefreshUpdatedDataTest.java index 0087e52fc8..cddabb45a0 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/RefreshUpdatedDataTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/RefreshUpdatedDataTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/TransactionalConcurrencyCollectionCacheEvictionTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/TransactionalConcurrencyCollectionCacheEvictionTest.java index ba23e9b01b..74d9bd409c 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/TransactionalConcurrencyCollectionCacheEvictionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/TransactionalConcurrencyCollectionCacheEvictionTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/hhh13179/HHH13179Test.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/hhh13179/HHH13179Test.java index 776fb3bb02..998aaaf6a8 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cache/hhh13179/HHH13179Test.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cache/hhh13179/HHH13179Test.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cfg/BatchVersionedDataConfigTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cfg/BatchVersionedDataConfigTest.java index d166a1a07e..ee97ca5ee1 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cfg/BatchVersionedDataConfigTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cfg/BatchVersionedDataConfigTest.java @@ -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 ) ); diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/cfg/cache/DirectReferenceCacheEntriesTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/cfg/cache/DirectReferenceCacheEntriesTest.java index dd828c1b29..b86d394fe8 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/cfg/cache/DirectReferenceCacheEntriesTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/cfg/cache/DirectReferenceCacheEntriesTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/embeddable/OrderByEmbeddableToOneTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/embeddable/OrderByEmbeddableToOneTest.java index 13948bc385..b9bf1223f5 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/embeddable/OrderByEmbeddableToOneTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/embeddable/OrderByEmbeddableToOneTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/embeddable/OrderByEmbeddableX2Test.java b/hibernate-core/src/test/java/org/hibernate/orm/test/embeddable/OrderByEmbeddableX2Test.java index dcd9ad2605..ab405bda20 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/embeddable/OrderByEmbeddableX2Test.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/embeddable/OrderByEmbeddableX2Test.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/event/collection/detached/BadMergeHandlingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/event/collection/detached/BadMergeHandlingTest.java index 66cca63a0c..ee7fe7c4ff 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/event/collection/detached/BadMergeHandlingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/event/collection/detached/BadMergeHandlingTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/event/collection/detached/MergeCollectionEventTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/event/collection/detached/MergeCollectionEventTest.java index 4be6effb80..08378e5830 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/event/collection/detached/MergeCollectionEventTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/event/collection/detached/MergeCollectionEventTest.java @@ -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 = diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/fetch/OneToOneOwnerByContainedEagerCyclesTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetch/OneToOneOwnerByContainedEagerCyclesTest.java index e6d0ca63f2..d8d4a4ff4d 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/fetch/OneToOneOwnerByContainedEagerCyclesTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetch/OneToOneOwnerByContainedEagerCyclesTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/CollectionLoadedInTwoPhaseLoadTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/CollectionLoadedInTwoPhaseLoadTest.java index 44238a589a..56d636a486 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/CollectionLoadedInTwoPhaseLoadTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/CollectionLoadedInTwoPhaseLoadTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/EntityLoadedInTwoPhaseLoadTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/EntityLoadedInTwoPhaseLoadTest.java index 5045415ca4..e9461837ed 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/EntityLoadedInTwoPhaseLoadTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/EntityLoadedInTwoPhaseLoadTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/join/JoinFetchProfileTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/join/JoinFetchProfileTest.java index 84925c8cb9..9562ce790a 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/join/JoinFetchProfileTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/join/JoinFetchProfileTest.java @@ -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" }) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/flush/TestClearBatchFetchQueueAfterFlush.java b/hibernate-core/src/test/java/org/hibernate/orm/test/flush/TestClearBatchFetchQueueAfterFlush.java index bddba3f6c1..bd3544cf3d 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/flush/TestClearBatchFetchQueueAfterFlush.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/flush/TestClearBatchFetchQueueAfterFlush.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/generatedkeys/identity/IdentityGeneratedKeysTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/generatedkeys/identity/IdentityGeneratedKeysTest.java index a590c16a76..111086d289 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/generatedkeys/identity/IdentityGeneratedKeysTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/generatedkeys/identity/IdentityGeneratedKeysTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/hbm/query/NamedQueryTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hbm/query/NamedQueryTest.java index c4326b9076..1c444390e9 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/hbm/query/NamedQueryTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hbm/query/NamedQueryTest.java @@ -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(); diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/hbm/query/QueryReturnTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hbm/query/QueryReturnTest.java index 4001bd2e11..292e6a199b 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/hbm/query/QueryReturnTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hbm/query/QueryReturnTest.java @@ -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(); diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/ASTParserLoadingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/ASTParserLoadingTest.java index eb8ead0e09..62e8bb02c1 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/ASTParserLoadingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/ASTParserLoadingTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/FunctionNameAsColumnTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/FunctionNameAsColumnTest.java index 656c3eb76f..a981beb261 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/FunctionNameAsColumnTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/FunctionNameAsColumnTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/repeatedtable/AlternativeToRepeatedTableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/repeatedtable/AlternativeToRepeatedTableTest.java index 123dcec0d7..73fb75417f 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/repeatedtable/AlternativeToRepeatedTableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/repeatedtable/AlternativeToRepeatedTableTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/repeatedtable/RepeatedSubclassTableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/repeatedtable/RepeatedSubclassTableTest.java index aedc5b2b26..2b0c4b84e1 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/repeatedtable/RepeatedSubclassTableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/repeatedtable/RepeatedSubclassTableTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/repeatedtable/RepeatedTableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/repeatedtable/RepeatedTableTest.java index 07f6686308..7c9583ef58 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/repeatedtable/RepeatedTableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/repeatedtable/RepeatedTableTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/compliance/tck2_2/TableGeneratorVisibilityTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/compliance/tck2_2/TableGeneratorVisibilityTest.java index 88ee3b88e3..acf825cb1a 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/compliance/tck2_2/TableGeneratorVisibilityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/compliance/tck2_2/TableGeneratorVisibilityTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/loading/multiLoad/MultiLoadSecondLlvCacheTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/loading/multiLoad/MultiLoadSecondLlvCacheTest.java index 5cfb226abd..f29d707016 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/loading/multiLoad/MultiLoadSecondLlvCacheTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/loading/multiLoad/MultiLoadSecondLlvCacheTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/formula/FormulaWithColumnTypesTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/formula/FormulaWithColumnTypesTest.java index e0ff77bcac..949565b526 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/formula/FormulaWithColumnTypesTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/formula/FormulaWithColumnTypesTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/pagination/hhh9965/HHH9965Test.java b/hibernate-core/src/test/java/org/hibernate/orm/test/pagination/hhh9965/HHH9965Test.java index fc64caaef4..908e88ad1d 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/pagination/hhh9965/HHH9965Test.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/pagination/hhh9965/HHH9965Test.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/proxy/MultipleSessionFactoriesProxyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/proxy/MultipleSessionFactoriesProxyTest.java index 3d0dbf62e2..05bff5115f 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/proxy/MultipleSessionFactoriesProxyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/proxy/MultipleSessionFactoriesProxyTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/proxy/ProxyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/proxy/ProxyTest.java index caca8b0529..bcf1626e68 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/proxy/ProxyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/proxy/ProxyTest.java @@ -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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/internal/hhh13151/TreatedEntityFetchTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/internal/hhh13151/TreatedEntityFetchTest.java index e47cc73638..2f7a78ec84 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/internal/hhh13151/TreatedEntityFetchTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/internal/hhh13151/TreatedEntityFetchTest.java @@ -37,8 +37,8 @@ public class TreatedEntityFetchTest 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.SHOW_SQL, true ); + configuration.setProperty( AvailableSettings.FORMAT_SQL, true ); // configuration.setProperty( AvailableSettings.GENERATE_STATISTICS, "true" ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/OrderByTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/OrderByTests.java index ab69d96c52..1c7e015c7a 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/OrderByTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/OrderByTests.java @@ -63,8 +63,8 @@ public class OrderByTests extends BaseCoreFunctionalTestCase { @Override public void configure(Configuration cfg) { super.configure( cfg ); - cfg.setProperty( Environment.USE_QUERY_CACHE, "false" ); - cfg.setProperty( Environment.GENERATE_STATISTICS, "true" ); + cfg.setProperty( Environment.USE_QUERY_CACHE, false ); + cfg.setProperty( Environment.GENERATE_STATISTICS, true ); } private void createData() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/serialization/CacheKeySerializationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/serialization/CacheKeySerializationTest.java index 34b2da1c08..0f3260ed21 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/serialization/CacheKeySerializationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/serialization/CacheKeySerializationTest.java @@ -6,7 +6,9 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; +import jakarta.persistence.SharedCacheMode; import org.hibernate.Session; +import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.cache.internal.DefaultCacheKeysFactory; import org.hibernate.cache.internal.SimpleCacheKeysFactory; import org.hibernate.cache.spi.CacheKeysFactory; @@ -22,6 +24,7 @@ import org.hibernate.testing.TestForIssue; import org.hibernate.testing.cache.CachingRegionFactory; import org.hibernate.testing.orm.junit.BaseUnitTest; import org.hibernate.testing.util.ServiceRegistryUtil; +import org.hibernate.tool.schema.Action; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -35,11 +38,11 @@ import static org.junit.jupiter.api.Assertions.assertTrue; public class CacheKeySerializationTest { private SessionFactoryImplementor getSessionFactory(String cacheKeysFactory) { Configuration configuration = new Configuration() - .setProperty(Environment.USE_SECOND_LEVEL_CACHE, "true") - .setProperty(Environment.CACHE_REGION_FACTORY, CachingRegionFactory.class.getName()) - .setProperty(Environment.DEFAULT_CACHE_CONCURRENCY_STRATEGY, "transactional") - .setProperty("javax.persistence.sharedCache.mode", "ALL") - .setProperty(Environment.HBM2DDL_AUTO, "create-drop"); + .setProperty(Environment.USE_SECOND_LEVEL_CACHE, true) + .setProperty(Environment.CACHE_REGION_FACTORY, CachingRegionFactory.class) + .setProperty(Environment.DEFAULT_CACHE_CONCURRENCY_STRATEGY, CacheConcurrencyStrategy.TRANSACTIONAL) + .setProperty(Environment.JPA_SHARED_CACHE_MODE, SharedCacheMode.ALL) + .setProperty(Environment.HBM2DDL_AUTO, Action.ACTION_CREATE_THEN_DROP); ServiceRegistryUtil.applySettings( configuration.getStandardServiceRegistryBuilder() ); if (cacheKeysFactory != null) { configuration.setProperty(Environment.CACHE_KEYS_FACTORY, cacheKeysFactory); diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/serialization/ProxySerializationNoSessionFactoryTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/serialization/ProxySerializationNoSessionFactoryTest.java index 721884c88d..cf768d5cdd 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/serialization/ProxySerializationNoSessionFactoryTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/serialization/ProxySerializationNoSessionFactoryTest.java @@ -18,6 +18,7 @@ import org.hibernate.proxy.HibernateProxy; import org.hibernate.testing.junit4.BaseUnitTestCase; import org.hibernate.testing.util.ServiceRegistryUtil; +import org.hibernate.tool.schema.Action; import org.junit.Test; import jakarta.persistence.Entity; @@ -48,7 +49,7 @@ public class ProxySerializationNoSessionFactoryTest extends BaseUnitTestCase { private void executeTest(boolean initializeProxy) { final Configuration cfg = new Configuration() - .setProperty( AvailableSettings.HBM2DDL_AUTO, "create-drop" ) + .setProperty( AvailableSettings.HBM2DDL_AUTO, Action.ACTION_CREATE_THEN_DROP ) .addAnnotatedClass( SimpleEntity.class ) .addAnnotatedClass( ChildEntity.class ); ServiceRegistryUtil.applySettings( cfg.getStandardServiceRegistryBuilder() ); diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/serialization/SessionFactorySerializationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/serialization/SessionFactorySerializationTest.java index 610f1be162..e01ff143be 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/serialization/SessionFactorySerializationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/serialization/SessionFactorySerializationTest.java @@ -37,7 +37,7 @@ public class SessionFactorySerializationTest extends BaseUnitTestCase { public void testNamedSessionFactorySerialization() throws Exception { Configuration cfg = new Configuration() .setProperty( AvailableSettings.SESSION_FACTORY_NAME, NAME ) - .setProperty( AvailableSettings.SESSION_FACTORY_NAME_IS_JNDI, "false" ); // default is true + .setProperty( AvailableSettings.SESSION_FACTORY_NAME_IS_JNDI, false ); // default is true ServiceRegistryUtil.applySettings( cfg.getStandardServiceRegistryBuilder() ); try (SessionFactory factory = cfg.buildSessionFactory()) { @@ -69,7 +69,7 @@ public class SessionFactorySerializationTest extends BaseUnitTestCase { // IMPL NOTE : this test is a control to testNamedSessionFactorySerialization // here, the test should fail based just on attempted uuid resolution Configuration cfg = new Configuration() - .setProperty( AvailableSettings.SESSION_FACTORY_NAME_IS_JNDI, "false" ); // default is true + .setProperty( AvailableSettings.SESSION_FACTORY_NAME_IS_JNDI, false ); // default is true ServiceRegistryUtil.applySettings( cfg.getStandardServiceRegistryBuilder() ); try (SessionFactory factory = cfg.buildSessionFactory()) { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/subclassProxyInterface/SubclassProxyInterfaceTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/subclassProxyInterface/SubclassProxyInterfaceTest.java index 29f7793109..15d975d8eb 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/subclassProxyInterface/SubclassProxyInterfaceTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/subclassProxyInterface/SubclassProxyInterfaceTest.java @@ -22,7 +22,7 @@ public class SubclassProxyInterfaceTest { @Test public void testSubclassProxyInterfaces() { final Configuration cfg = new Configuration() - .setProperty( Environment.DIALECT, H2Dialect.class.getName() ) + .setProperty( Environment.DIALECT, H2Dialect.class ) .addClass( Person.class ); try (ServiceRegistry serviceRegistry = ServiceRegistryBuilder.buildServiceRegistry( cfg.getProperties() ) ) { cfg.buildSessionFactory( serviceRegistry ).close(); diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/ternary/TernaryTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/ternary/TernaryTest.java index cdb54554d3..4adc3dfdb2 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/ternary/TernaryTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/ternary/TernaryTest.java @@ -39,7 +39,7 @@ public class TernaryTest 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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/type/OffsetDateTimeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/type/OffsetDateTimeTest.java index 5172a7538d..02496c0c47 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/type/OffsetDateTimeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/type/OffsetDateTimeTest.java @@ -48,7 +48,7 @@ public class OffsetDateTimeTest extends AbstractJavaTimeTypeTest { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/type/OffsetTimeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/type/OffsetTimeTest.java index dd3bde471c..b513c6b9b8 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/type/OffsetTimeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/type/OffsetTimeTest.java @@ -47,7 +47,7 @@ public class OffsetTimeTest extends AbstractJavaTimeTypeTest { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/type/ZonedDateTimeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/type/ZonedDateTimeTest.java index 2cf5ea53ff..f9973bc440 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/type/ZonedDateTimeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/type/ZonedDateTimeTest.java @@ -48,7 +48,7 @@ public class ZonedDateTimeTest extends AbstractJavaTimeTypeTest { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/unidir/BackrefTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/unidir/BackrefTest.java index d6d42ef048..f1b6be794c 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/unidir/BackrefTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/unidir/BackrefTest.java @@ -44,7 +44,7 @@ public class BackrefTest 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 diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/uniquekey/NaturalIdCachingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/uniquekey/NaturalIdCachingTest.java index 72564e7ac1..fc49c9c75e 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/uniquekey/NaturalIdCachingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/uniquekey/NaturalIdCachingTest.java @@ -36,8 +36,8 @@ public class NaturalIdCachingTest extends BaseCoreFunctionalTestCase { @Override protected void configure(Configuration configuration) { super.configure(configuration); - configuration.setProperty(AvailableSettings.SHOW_SQL, Boolean.TRUE.toString()); - configuration.setProperty(AvailableSettings.GENERATE_STATISTICS, "true"); + configuration.setProperty(AvailableSettings.SHOW_SQL, true); + configuration.setProperty(AvailableSettings.GENERATE_STATISTICS, true); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/where/annotations/LazyManyToManyNonUniqueIdWhereTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/where/annotations/LazyManyToManyNonUniqueIdWhereTest.java index 53288aa83a..a49d225d77 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/where/annotations/LazyManyToManyNonUniqueIdWhereTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/where/annotations/LazyManyToManyNonUniqueIdWhereTest.java @@ -54,7 +54,7 @@ public class LazyManyToManyNonUniqueIdWhereTest extends BaseCoreFunctionalTestCa @Override protected void configure(Configuration configuration) { super.configure( configuration ); - configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG.name() ); + configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG ); } @Before diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/where/annotations/LazyOneToManyNonUniqueIdWhereTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/where/annotations/LazyOneToManyNonUniqueIdWhereTest.java index 4657bdba24..232cd76172 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/where/annotations/LazyOneToManyNonUniqueIdWhereTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/where/annotations/LazyOneToManyNonUniqueIdWhereTest.java @@ -51,7 +51,7 @@ public class LazyOneToManyNonUniqueIdWhereTest extends BaseCoreFunctionalTestCas @Override protected void configure(Configuration configuration) { super.configure( configuration ); - configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG.name() ); + configuration.setProperty( DEFAULT_LIST_SEMANTICS, CollectionClassification.BAG ); } @Before