From 64c331150bbcebd3c205641f311ead86f68195a0 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Mon, 23 Aug 2021 17:23:12 +0200 Subject: [PATCH] Re-enabled additional documentation tests --- documentation/documentation.gradle | 5 ++++- .../mapping/generated/DatabaseValueGenerationTest.java | 3 +++ .../java/org/hibernate/userguide/pc/CascadeOnDeleteTest.java | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/documentation/documentation.gradle b/documentation/documentation.gradle index e550c4490f..6d337539a5 100644 --- a/documentation/documentation.gradle +++ b/documentation/documentation.gradle @@ -291,7 +291,10 @@ tasks.withType(AsciidoctorTask).all { // Testing test { - include '**/mapping/basic/**' + include '**/**' + exclude '**/HQLTest**' + exclude '**/SQLTest**' //derby failures + exclude '**/PostgreSQLFunctionWhereClauseTest**' } // resources inherently exclude sources diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/generated/DatabaseValueGenerationTest.java b/documentation/src/test/java/org/hibernate/userguide/mapping/generated/DatabaseValueGenerationTest.java index 870997a9b4..eaecbb921f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/generated/DatabaseValueGenerationTest.java +++ b/documentation/src/test/java/org/hibernate/userguide/mapping/generated/DatabaseValueGenerationTest.java @@ -15,11 +15,13 @@ import javax.persistence.GeneratedValue; import javax.persistence.Id; import org.hibernate.annotations.ValueGenerationType; +import org.hibernate.dialect.SybaseDialect; import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase; import org.hibernate.tuple.AnnotationValueGeneration; import org.hibernate.tuple.GenerationTiming; import org.hibernate.tuple.ValueGenerator; +import org.hibernate.testing.SkipForDialect; import org.junit.Test; import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; @@ -27,6 +29,7 @@ import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; /** * @author Vlad Mihalcea */ +@SkipForDialect( value = SybaseDialect.class, comment = "Sybase doesn't seem to support current_timestamp") public class DatabaseValueGenerationTest extends BaseEntityManagerFunctionalTestCase { @Override diff --git a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeOnDeleteTest.java b/documentation/src/test/java/org/hibernate/userguide/pc/CascadeOnDeleteTest.java index be78241ad8..d25836f399 100644 --- a/documentation/src/test/java/org/hibernate/userguide/pc/CascadeOnDeleteTest.java +++ b/documentation/src/test/java/org/hibernate/userguide/pc/CascadeOnDeleteTest.java @@ -1,5 +1,6 @@ package org.hibernate.userguide.pc; +import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; @@ -10,6 +11,8 @@ import org.hibernate.annotations.OnDelete; import org.hibernate.annotations.OnDeleteAction; import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase; +import org.hibernate.testing.DialectChecks; +import org.hibernate.testing.RequiresDialectFeature; import org.junit.Test; import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; @@ -17,6 +20,7 @@ import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; /** * @author Vlad Mihalcea */ +@RequiresDialectFeature(DialectChecks.SupportsCascadeDeleteCheck.class) public class CascadeOnDeleteTest extends BaseEntityManagerFunctionalTestCase { @Override