HHH-8897 Add @FailureExpectedWithNewMetamodel

This commit is contained in:
Andrea Boriero 2014-09-22 14:13:37 +01:00
parent 740078eff8
commit b2a3e42614
2 changed files with 13 additions and 0 deletions

View File

@ -49,10 +49,12 @@ import org.hibernate.metamodel.MetadataSources;
import org.hibernate.metamodel.spi.MetadataImplementor; import org.hibernate.metamodel.spi.MetadataImplementor;
import org.hibernate.stat.Statistics; import org.hibernate.stat.Statistics;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.jta.TestingJtaBootstrap; import org.hibernate.testing.jta.TestingJtaBootstrap;
import org.hibernate.testing.jta.TestingJtaPlatformImpl; import org.hibernate.testing.jta.TestingJtaPlatformImpl;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.hibernate.testing.junit4.BaseUnitTestCase; import org.hibernate.testing.junit4.BaseUnitTestCase;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@ -68,6 +70,7 @@ import org.jboss.util.naming.NonSerializableFactory;
import org.jnp.server.Main; import org.jnp.server.Main;
import org.jnp.server.SingletonNamingServer; import org.jnp.server.SingletonNamingServer;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
/** /**
@ -147,6 +150,8 @@ public class JndiRegionFactoryTestCase extends BaseUnitTestCase {
} }
@Test @Test
@FailureExpectedWithNewMetamodel( message = "ForeignKeyHelper.java:140 fails with org.hibernate.cfg.NotYetImplementedException: " +
"No support yet for referenced join columns unless they correspond with columns bound for an attribute binding." )
public void testRedeployment() throws Exception { public void testRedeployment() throws Exception {
SessionFactoryImplementor sf = (SessionFactoryImplementor) buildMetadata().buildSessionFactory(); SessionFactoryImplementor sf = (SessionFactoryImplementor) buildMetadata().buildSessionFactory();
addEntityCheckCache( sf ); addEntityCheckCache( sf );

View File

@ -53,8 +53,11 @@ import org.hibernate.metamodel.spi.binding.PluralAttributeBinding;
import org.hibernate.service.ServiceRegistry; import org.hibernate.service.ServiceRegistry;
import org.hibernate.stat.Statistics; import org.hibernate.stat.Statistics;
import org.hibernate.test.cache.infinispan.functional.Item; import org.hibernate.test.cache.infinispan.functional.Item;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.ServiceRegistryBuilder; import org.hibernate.testing.ServiceRegistryBuilder;
import org.hibernate.testing.jta.JtaAwareConnectionProviderImpl; import org.hibernate.testing.jta.JtaAwareConnectionProviderImpl;
import org.hibernate.testing.junit4.CustomRunner;
import org.infinispan.configuration.cache.ConfigurationBuilder; import org.infinispan.configuration.cache.ConfigurationBuilder;
import org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup; import org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup;
import org.infinispan.util.logging.Log; import org.infinispan.util.logging.Log;
@ -66,6 +69,7 @@ import org.jnp.server.NamingServer;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
/** /**
* This is an example test based on http://community.jboss.org/docs/DOC-14617 that shows how to interact with * This is an example test based on http://community.jboss.org/docs/DOC-14617 that shows how to interact with
@ -77,6 +81,7 @@ import org.junit.Test;
* @author Galder Zamarreño * @author Galder Zamarreño
* @since 3.5 * @since 3.5
*/ */
@RunWith( CustomRunner.class )
public class JBossStandaloneJtaExampleTest { public class JBossStandaloneJtaExampleTest {
private static final Log log = LogFactory.getLog(JBossStandaloneJtaExampleTest.class); private static final Log log = LogFactory.getLog(JBossStandaloneJtaExampleTest.class);
private static final JBossStandaloneJTAManagerLookup lookup = new JBossStandaloneJTAManagerLookup(); private static final JBossStandaloneJTAManagerLookup lookup = new JBossStandaloneJTAManagerLookup();
@ -108,7 +113,10 @@ public class JBossStandaloneJtaExampleTest {
} }
} }
} }
@Test @Test
@FailureExpectedWithNewMetamodel( message = "ForeignKeyHelper.java:140 fails with org.hibernate.cfg.NotYetImplementedException: " +
"No support yet for referenced join columns unless they correspond with columns bound for an attribute binding." )
public void testPersistAndLoadUnderJta() throws Exception { public void testPersistAndLoadUnderJta() throws Exception {
Item item; Item item;
SessionFactory sessionFactory = buildSessionFactory(); SessionFactory sessionFactory = buildSessionFactory();