HHH-13569 : org.hibernate.test.annotations.embedded.EmbeddedTest failures on Sybase

This commit is contained in:
Gail Badner 2019-08-13 18:02:32 -07:00
parent 1a5b401d09
commit 937d4a3503
1 changed files with 14 additions and 0 deletions

View File

@ -18,8 +18,10 @@ import org.hibernate.Session;
import org.hibernate.Transaction; import org.hibernate.Transaction;
import org.hibernate.boot.MetadataBuilder; import org.hibernate.boot.MetadataBuilder;
import org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl; import org.hibernate.boot.model.naming.ImplicitNamingStrategyJpaCompliantImpl;
import org.hibernate.dialect.SybaseDialect;
import org.hibernate.testing.FailureExpected; import org.hibernate.testing.FailureExpected;
import org.hibernate.testing.SkipForDialect;
import org.hibernate.testing.TestForIssue; import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase; import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase;
import org.hibernate.testing.transaction.TransactionUtil; import org.hibernate.testing.transaction.TransactionUtil;
@ -27,6 +29,7 @@ import org.hibernate.test.annotations.embedded.FloatLeg.RateIndex;
import org.hibernate.test.annotations.embedded.Leg.Frequency; import org.hibernate.test.annotations.embedded.Leg.Frequency;
import org.hibernate.test.util.SchemaUtil; import org.hibernate.test.util.SchemaUtil;
import org.junit.After;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@ -39,6 +42,16 @@ import static org.junit.Assert.assertTrue;
* @author Emmanuel Bernard * @author Emmanuel Bernard
*/ */
public class EmbeddedTest extends BaseNonConfigCoreFunctionalTestCase { public class EmbeddedTest extends BaseNonConfigCoreFunctionalTestCase {
@After
public void cleanup() {
TransactionUtil.doInHibernate( this::sessionFactory, session ->{
for ( Person person : session.createQuery( "from Person", Person.class ).getResultList() ) {
session.delete( person );
}
} );
}
@Test @Test
public void testSimple() throws Exception { public void testSimple() throws Exception {
Person person = new Person(); Person person = new Person();
@ -145,6 +158,7 @@ public class EmbeddedTest extends BaseNonConfigCoreFunctionalTestCase {
@Test @Test
@TestForIssue(jiraKey = "HHH-8172") @TestForIssue(jiraKey = "HHH-8172")
@SkipForDialect( value = SybaseDialect.class, comment = "skip for Sybase because (null = null) evaluates to true")
@FailureExpected(jiraKey = "HHH-8172") @FailureExpected(jiraKey = "HHH-8172")
public void testQueryWithEmbeddedParameterOneNull() throws Exception { public void testQueryWithEmbeddedParameterOneNull() throws Exception {
Person person = new Person(); Person person = new Person();