Fix tests for Oracle 11

This commit is contained in:
Christian Beikov 2023-08-16 20:02:01 +02:00
parent 689d16216d
commit 3c389d7196
3 changed files with 11 additions and 8 deletions

View File

@ -20,6 +20,7 @@
import org.hibernate.testing.orm.junit.SkipForDialect; import org.hibernate.testing.orm.junit.SkipForDialect;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import jakarta.persistence.LockModeType; import jakarta.persistence.LockModeType;
import jakarta.persistence.LockTimeoutException; import jakarta.persistence.LockTimeoutException;
@ -40,10 +41,12 @@
public class FollowOnLockingTest { public class FollowOnLockingTest {
@Test @Test
@Timeout( 10 )
public void testQueryLockingWithoutFollowOn(SessionFactoryScope scope) { public void testQueryLockingWithoutFollowOn(SessionFactoryScope scope) {
testQueryLocking( scope, false ); testQueryLocking( scope, false );
} }
@Test @Test
@Timeout( 10 )
public void testQueryLockingWithFollowOn(SessionFactoryScope scope) { public void testQueryLockingWithFollowOn(SessionFactoryScope scope) {
testQueryLocking( scope, true ); testQueryLocking( scope, true );
} }

View File

@ -100,9 +100,9 @@ public void testImplicitJoinWithRelatedEntity(EntityManagerFactoryScope scope) {
}); });
} }
@Entity @Entity(name = "MasterEntity")
@Inheritance(strategy = InheritanceType.JOINED) @Inheritance(strategy = InheritanceType.JOINED)
public class MasterEntity { public static class MasterEntity {
@Id @Id
@GeneratedValue @GeneratedValue
public Long id; public Long id;
@ -123,8 +123,8 @@ public void setMasterField(final String masterField) {
} }
} }
@Entity @Entity(name = "ChildEntity")
public class ChildEntity extends MasterEntity { public static class ChildEntity extends MasterEntity {
private String childField; private String childField;
@OneToMany(mappedBy = "childEntity") @OneToMany(mappedBy = "childEntity")
@ -147,8 +147,8 @@ public void setRelatedEntitySet(final Set<RelatedEntity> relatedEntitySet) {
} }
} }
@Entity @Entity(name = "RelatedEntity")
public class RelatedEntity { public static class RelatedEntity {
@Id @Id
@GeneratedValue @GeneratedValue
public Long id; public Long id;

View File

@ -56,7 +56,7 @@ public void testHhh17001(SessionFactoryScope scope) {
} }
@Entity @Entity(name = "Parent")
public static class Parent { public static class Parent {
@Id @Id
private Long id; private Long id;
@ -67,7 +67,7 @@ public static class Parent {
private Set<Child> children = new HashSet<>(); private Set<Child> children = new HashSet<>();
} }
@Entity @Entity(name = "Child")
public static class Child { public static class Child {
@Id @Id
private Long id; private Long id;