Skip a test on Cockroach and add PostgreSQL version requirement for other test.

This commit is contained in:
Christian Beikov 2023-06-26 18:16:00 +02:00
parent 876f6db487
commit 4903b2f14d
2 changed files with 4 additions and 1 deletions

View File

@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
@DomainModel(annotatedClasses = CustomSqlOverrideTest.Custom.class)
@RequiresDialect(H2Dialect.class)
@RequiresDialect(MySQLDialect.class)
@RequiresDialect(PostgreSQLDialect.class)
@RequiresDialect(value = PostgreSQLDialect.class, majorVersion = 13)
@RequiresDialect(SQLServerDialect.class)
public class CustomSqlOverrideTest {
@Test

View File

@ -5,7 +5,9 @@ import static org.assertj.core.api.Assertions.assertThat;
import java.util.stream.Stream;
import org.hibernate.LockMode;
import org.hibernate.dialect.CockroachDialect;
import org.hibernate.testing.SkipForDialect;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.orm.junit.DomainModel;
import org.hibernate.testing.orm.junit.SessionFactory;
@ -23,6 +25,7 @@ import jakarta.persistence.Version;
})
@SessionFactory
@TestForIssue(jiraKey = "HHH-16461")
@SkipForDialect(value = CockroachDialect.class, comment = "CockroachDB uses SERIALIZABLE isolation, and does not support this")
public class OptimisticAndPessimisticLockTest {
public Stream<LockMode> pessimisticLockModes() {