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.event.EventListeners;
import org.hibernate.stat.Statistics;
import org.hibernate.testing.junit.FailureExpected;
import org.hibernate.util.ConfigHelper;
/**
@ -72,7 +73,7 @@ import org.hibernate.util.ConfigHelper;
*/
@SuppressWarnings("unchecked")
public class PackagedEntityManagerTest extends PackagingTestCase {
@FailureExpected(jiraKey = "HHH-5693")
public void testDefaultPar() throws Exception {
File testPackage = buildDefaultPar();
addPackageToClasspath( testPackage );
@ -107,6 +108,7 @@ public class PackagedEntityManagerTest extends PackagingTestCase {
emf.close();
}
@FailureExpected(jiraKey = "HHH-5693")
public void testDefaultParForPersistence_1_0() throws Exception {
File testPackage = buildDefaultPar_1_0();
addPackageToClasspath( testPackage );
@ -179,6 +181,7 @@ public class PackagedEntityManagerTest extends PackagingTestCase {
emf.close();
}
@FailureExpected(jiraKey = "HHH-5693")
public void testExplodedPar() throws Exception {
File testPackage = buildExplodedPar();
addPackageToClasspath( testPackage );
@ -334,7 +337,7 @@ public class PackagedEntityManagerTest extends PackagingTestCase {
assertTrue( em.contains( item ) );
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 );
assertSame( item, item1 );
item.setDescr( "Micro$oft wireless mouse" );
@ -353,7 +356,7 @@ public class PackagedEntityManagerTest extends PackagingTestCase {
assertSame( item, item1 );
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 );
assertSame( item, item1 );
assertTrue( em.contains( item ) );
@ -378,7 +381,7 @@ public class PackagedEntityManagerTest extends PackagingTestCase {
res.setName( "Bruce" );
item.setDistributors( new HashSet<Distributor>() );
item.getDistributors().add( res );
Statistics stats = ( ( HibernateEntityManagerFactory ) emf ).getSessionFactory().getStatistics();
Statistics stats = ( (HibernateEntityManagerFactory) emf ).getSessionFactory().getStatistics();
stats.clear();
stats.setStatisticsEnabled( true );

View File

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