HHH-5693 Disable package-info related tests for now

This commit is contained in:
Hardy Ferentschik 2010-10-29 14:59:16 +02:00
parent ca009f5340
commit 179837554f
2 changed files with 15 additions and 7 deletions

View File

@ -59,6 +59,7 @@ import org.hibernate.ejb.test.pack.various.Seat;
import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.SessionImplementor;
import org.hibernate.event.EventListeners; import org.hibernate.event.EventListeners;
import org.hibernate.stat.Statistics; import org.hibernate.stat.Statistics;
import org.hibernate.testing.junit.FailureExpected;
import org.hibernate.util.ConfigHelper; import org.hibernate.util.ConfigHelper;
/** /**
@ -72,7 +73,7 @@ import org.hibernate.util.ConfigHelper;
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public class PackagedEntityManagerTest extends PackagingTestCase { public class PackagedEntityManagerTest extends PackagingTestCase {
@FailureExpected(jiraKey = "HHH-5693")
public void testDefaultPar() throws Exception { public void testDefaultPar() throws Exception {
File testPackage = buildDefaultPar(); File testPackage = buildDefaultPar();
addPackageToClasspath( testPackage ); addPackageToClasspath( testPackage );
@ -107,6 +108,7 @@ public class PackagedEntityManagerTest extends PackagingTestCase {
emf.close(); emf.close();
} }
@FailureExpected(jiraKey = "HHH-5693")
public void testDefaultParForPersistence_1_0() throws Exception { public void testDefaultParForPersistence_1_0() throws Exception {
File testPackage = buildDefaultPar_1_0(); File testPackage = buildDefaultPar_1_0();
addPackageToClasspath( testPackage ); addPackageToClasspath( testPackage );
@ -179,6 +181,7 @@ public class PackagedEntityManagerTest extends PackagingTestCase {
emf.close(); emf.close();
} }
@FailureExpected(jiraKey = "HHH-5693")
public void testExplodedPar() throws Exception { public void testExplodedPar() throws Exception {
File testPackage = buildExplodedPar(); File testPackage = buildExplodedPar();
addPackageToClasspath( testPackage ); addPackageToClasspath( testPackage );
@ -334,7 +337,7 @@ public class PackagedEntityManagerTest extends PackagingTestCase {
assertTrue( em.contains( item ) ); assertTrue( em.contains( item ) );
em.getTransaction().begin(); em.getTransaction().begin();
Item item1 = ( Item ) em.createQuery( "select i from Item i where descr like 'M%'" ).getSingleResult(); Item item1 = (Item) em.createQuery( "select i from Item i where descr like 'M%'" ).getSingleResult();
assertNotNull( item1 ); assertNotNull( item1 );
assertSame( item, item1 ); assertSame( item, item1 );
item.setDescr( "Micro$oft wireless mouse" ); item.setDescr( "Micro$oft wireless mouse" );
@ -353,7 +356,7 @@ public class PackagedEntityManagerTest extends PackagingTestCase {
assertSame( item, item1 ); assertSame( item, item1 );
assertTrue( em.contains( item ) ); assertTrue( em.contains( item ) );
item1 = ( Item ) em.createQuery( "select i from Item i where descr like 'M%'" ).getSingleResult(); item1 = (Item) em.createQuery( "select i from Item i where descr like 'M%'" ).getSingleResult();
assertNotNull( item1 ); assertNotNull( item1 );
assertSame( item, item1 ); assertSame( item, item1 );
assertTrue( em.contains( item ) ); assertTrue( em.contains( item ) );
@ -378,7 +381,7 @@ public class PackagedEntityManagerTest extends PackagingTestCase {
res.setName( "Bruce" ); res.setName( "Bruce" );
item.setDistributors( new HashSet<Distributor>() ); item.setDistributors( new HashSet<Distributor>() );
item.getDistributors().add( res ); item.getDistributors().add( res );
Statistics stats = ( ( HibernateEntityManagerFactory ) emf ).getSessionFactory().getStatistics(); Statistics stats = ( (HibernateEntityManagerFactory) emf ).getSessionFactory().getStatistics();
stats.clear(); stats.clear();
stats.setStatisticsEnabled( true ); stats.setStatisticsEnabled( true );

View File

@ -25,7 +25,6 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import junit.framework.TestCase;
import org.jboss.shrinkwrap.api.ArchivePath; import org.jboss.shrinkwrap.api.ArchivePath;
import org.jboss.shrinkwrap.api.ArchivePaths; import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.Archives; import org.jboss.shrinkwrap.api.Archives;
@ -59,6 +58,7 @@ import org.hibernate.ejb.test.pack.externaljar.Scooter;
import org.hibernate.ejb.test.pack.spacepar.Bug; import org.hibernate.ejb.test.pack.spacepar.Bug;
import org.hibernate.ejb.test.pack.various.Airplane; import org.hibernate.ejb.test.pack.various.Airplane;
import org.hibernate.ejb.test.pack.various.Seat; import org.hibernate.ejb.test.pack.various.Seat;
import org.hibernate.test.annotations.TestCase;
/** /**
* @author Hardy Ferentschik * @author Hardy Ferentschik
@ -77,10 +77,10 @@ public abstract class PackagingTestCase extends TestCase {
// this is assuming that there is a target directory // this is assuming that there is a target directory
int index = myUrl.getFile().lastIndexOf( "target" ); int index = myUrl.getFile().lastIndexOf( "target" );
if ( index == -1 ) { if ( index == -1 ) {
fail("Unable to setup packaging test"); fail( "Unable to setup packaging test" );
} }
String baseDirPath = myUrl.getFile().substring( 0, index); String baseDirPath = myUrl.getFile().substring( 0, index );
File baseDir = new File( baseDirPath ); File baseDir = new File( baseDirPath );
File testPackagesDir = new File( baseDir, "target/bundles" ); File testPackagesDir = new File( baseDir, "target/bundles" );
@ -366,6 +366,11 @@ public abstract class PackagingTestCase extends TestCase {
archive.as( ExplodedExporter.class ).exportExploded( packageTargetDir ); archive.as( ExplodedExporter.class ).exportExploded( packageTargetDir );
return testPackage; return testPackage;
} }
@Override
protected Class<?>[] getAnnotatedClasses() {
return new Class<?>[0];
}
} }