diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/lock/BatchAndLockTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/lock/BatchAndLockTest.java index b08e006153..9e40db845f 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/lock/BatchAndLockTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/lock/BatchAndLockTest.java @@ -79,7 +79,7 @@ public class BatchAndLockTest { scope.inTransaction( session -> { TestEntity testEntity = session.find( TestEntity.class, 1 ); - assertEntityLockMode( testEntity, LockModeType.OPTIMISTIC, session ); + assertEntityLockMode( testEntity, LockModeType.NONE, session ); } ); assertNoLokIsApplied( scope ); @@ -93,11 +93,11 @@ public class BatchAndLockTest { assertFalse( Hibernate.isInitialized( proxy ) ); TestEntity testEntity = session.find( TestEntity.class, 1 ); - assertEntityLockMode( testEntity, LockModeType.OPTIMISTIC, session ); + assertEntityLockMode( testEntity, LockModeType.NONE, session ); // batching is enabled because LockMode = NONE, so the proxy has been initialized assertTrue( Hibernate.isInitialized( proxy ) ); - assertEntityLockMode( proxy, LockModeType.OPTIMISTIC, session ); + assertEntityLockMode( proxy, LockModeType.NONE, session ); } ); assertNoLokIsApplied( scope ); @@ -108,7 +108,7 @@ public class BatchAndLockTest { scope.inTransaction( session -> { TestEntity testEntity = session.find( TestEntity.class, 1, LockModeType.NONE ); - assertEntityLockMode( testEntity, LockModeType.OPTIMISTIC, session ); + assertEntityLockMode( testEntity, LockModeType.NONE, session ); } ); assertNoLokIsApplied( scope ); @@ -122,11 +122,11 @@ public class BatchAndLockTest { assertFalse( Hibernate.isInitialized( proxy ) ); TestEntity testEntity = session.find( TestEntity.class, 1, LockModeType.NONE ); - assertEntityLockMode( testEntity, LockModeType.OPTIMISTIC, session ); + assertEntityLockMode( testEntity, LockModeType.NONE, session ); // batching is enabled because LockMode = NONE, so the proxy has been initialized assertTrue( Hibernate.isInitialized( proxy ) ); - assertEntityLockMode( proxy, LockModeType.OPTIMISTIC, session ); + assertEntityLockMode( proxy, LockModeType.NONE, session ); } ); assertNoLokIsApplied( scope );