HHH-12666 Only run the tests with H2

We don't need to run them with all our dialects: we just need to check
the mechanism works correctly.

At least TransactionExceptionHandlingTest fails with MariaDB so better
be safe.
This commit is contained in:
Guillaume Smet 2018-07-20 11:26:25 +02:00
parent 9fde3e08f0
commit cae8c12bbc
6 changed files with 22 additions and 8 deletions

View File

@ -6,6 +6,8 @@
*/
package org.hibernate.test.exceptionhandling;
import static org.junit.Assert.fail;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@ -15,13 +17,13 @@ import javax.persistence.ManyToOne;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.dialect.H2Dialect;
import org.hibernate.testing.RequiresDialect;
import org.hibernate.testing.TestForIssue;
import org.junit.Test;
import static org.junit.Assert.fail;
@TestForIssue(jiraKey = "HHH-12666")
@RequiresDialect(H2Dialect.class)
public class ConstraintViolationExceptionHandlingTest extends BaseExceptionHandlingTest {
public ConstraintViolationExceptionHandlingTest(BootstrapMethod bootstrapMethod,

View File

@ -6,6 +6,8 @@
*/
package org.hibernate.test.exceptionhandling;
import static org.junit.Assert.fail;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@ -16,13 +18,13 @@ import javax.persistence.PrimaryKeyJoinColumn;
import org.hibernate.Session;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
import org.hibernate.dialect.H2Dialect;
import org.hibernate.testing.RequiresDialect;
import org.hibernate.testing.TestForIssue;
import org.junit.Test;
import static org.junit.Assert.fail;
@TestForIssue(jiraKey = "HHH-12666")
@RequiresDialect(H2Dialect.class)
public class IdentifierGenerationExceptionHandlingTest extends BaseExceptionHandlingTest {
public IdentifierGenerationExceptionHandlingTest(

View File

@ -13,10 +13,13 @@ import javax.persistence.Id;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.dialect.H2Dialect;
import org.hibernate.testing.RequiresDialect;
import org.hibernate.testing.TestForIssue;
import org.junit.Test;
@TestForIssue(jiraKey = "HHH-12666")
@RequiresDialect(H2Dialect.class)
public class QuerySyntaxExceptionHandlingTest extends BaseExceptionHandlingTest {
public QuerySyntaxExceptionHandlingTest(

View File

@ -14,10 +14,13 @@ import javax.persistence.Id;
import javax.persistence.Version;
import org.hibernate.Session;
import org.hibernate.dialect.H2Dialect;
import org.hibernate.testing.RequiresDialect;
import org.hibernate.testing.TestForIssue;
import org.junit.Test;
@TestForIssue(jiraKey = "HHH-12666")
@RequiresDialect(H2Dialect.class)
public class StateObjectStateExceptionHandlingTest extends BaseExceptionHandlingTest {
public StateObjectStateExceptionHandlingTest(

View File

@ -12,8 +12,9 @@ import javax.persistence.Id;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.dialect.H2Dialect;
import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.testing.RequiresDialect;
import org.hibernate.testing.TestForIssue;
import org.junit.Test;
@ -21,6 +22,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
@TestForIssue(jiraKey = "HHH-12666")
@RequiresDialect(H2Dialect.class)
public class TransactionExceptionHandlingTest extends BaseExceptionHandlingTest {
public TransactionExceptionHandlingTest(

View File

@ -13,13 +13,15 @@ import javax.persistence.ManyToOne;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.dialect.H2Dialect;
import org.hibernate.testing.RequiresDialect;
import org.hibernate.testing.TestForIssue;
import org.junit.Test;
import static org.junit.Assert.fail;
@TestForIssue(jiraKey = "HHH-12666")
@RequiresDialect(H2Dialect.class)
public class TransientObjectExceptionHandlingTest extends BaseExceptionHandlingTest {
public TransientObjectExceptionHandlingTest(BootstrapMethod bootstrapMethod,