HHH-7459 remove FailureExpectedWithNewMetamodel from fixed tests

This commit is contained in:
Strong Liu 2012-10-21 00:55:27 +08:00
parent 22b0203ea7
commit 2fdf563999
16 changed files with 4 additions and 39 deletions

View File

@ -26,7 +26,6 @@ package org.hibernate.jpa.version;
import org.junit.Test;
import org.hibernate.Session;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
@ -43,7 +42,6 @@ public class JpaSpecVersionValueUpdatingTest extends BaseCoreFunctionalTestCase
}
@Test
@FailureExpectedWithNewMetamodel
public void testVersionNotIncrementedOnModificationOfNonOwningCollectionNonCascaded() {
Session session = openSession();
session.beginTransaction();

View File

@ -30,7 +30,6 @@ import org.junit.Test;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import static org.junit.Assert.assertEquals;
@ -68,7 +67,6 @@ public class CascadeTest extends BaseCoreFunctionalTestCase {
}
@Test
@FailureExpectedWithNewMetamodel
public void testMerge() {
Session s;
Transaction tx;
@ -83,7 +81,6 @@ public class CascadeTest extends BaseCoreFunctionalTestCase {
tx = s.beginTransaction();
tx.commit();
s.close();
s = openSession();
tx = s.beginTransaction();
tooth = (Tooth) s.get( Tooth.class, tooth.id );
@ -107,7 +104,6 @@ public class CascadeTest extends BaseCoreFunctionalTestCase {
}
@Test
@FailureExpectedWithNewMetamodel
public void testRemove() {
Session s;
Transaction tx;
@ -140,7 +136,6 @@ public class CascadeTest extends BaseCoreFunctionalTestCase {
}
@Test
@FailureExpectedWithNewMetamodel
public void testDetach() {
Session s;
Transaction tx;

View File

@ -30,7 +30,6 @@ import org.junit.Test;
import org.hibernate.Session;
import org.hibernate.testing.DialectChecks;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.RequiresDialectFeature;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
@ -83,7 +82,6 @@ import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
* c, e, d, b, g, f.
*/
@RequiresDialectFeature(DialectChecks.SupportsIdentityColumns.class)
@FailureExpectedWithNewMetamodel
public class MultiCircleJpaCascadeIdentityTest extends BaseCoreFunctionalTestCase {
private B b;
private C c;

View File

@ -29,7 +29,6 @@ import org.junit.Before;
import org.junit.Test;
import org.hibernate.Session;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
/**
@ -80,7 +79,6 @@ import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
* Entities are inserted in the following order:
* c, e, d, b, g, f.
*/
@FailureExpectedWithNewMetamodel
public class MultiCircleJpaCascadeSequenceTest extends BaseCoreFunctionalTestCase {
private B b;
private C c;

View File

@ -60,7 +60,6 @@ public class Java5FeaturesTest extends BaseCoreFunctionalTestCase {
}
@Test
@FailureExpectedWithNewMetamodel
public void testEnums() throws Exception {
Session s;
Transaction tx;
@ -117,7 +116,7 @@ public class Java5FeaturesTest extends BaseCoreFunctionalTestCase {
tx.commit();
s.close();
}
@Test
public void testAutoboxing() throws Exception {
Session s;
Transaction tx;

View File

@ -30,7 +30,6 @@ import org.junit.Test;
import org.hibernate.Hibernate;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import static org.junit.Assert.assertEquals;
@ -63,7 +62,6 @@ public class FetchingTest extends BaseCoreFunctionalTestCase {
}
@Test
@FailureExpectedWithNewMetamodel
public void testExtraLazy() throws Exception {
Session s;
Transaction tx;
@ -89,7 +87,6 @@ public class FetchingTest extends BaseCoreFunctionalTestCase {
}
@Test
@FailureExpectedWithNewMetamodel
public void testHibernateFetchingLazy() throws Exception {
Session s;
Transaction tx;
@ -116,7 +113,7 @@ public class FetchingTest extends BaseCoreFunctionalTestCase {
assertFalse( "lazy extra is failing", Hibernate.isInitialized( p.getOldStays() ) );
s.clear();
stay = (Stay) s.get( Stay.class, stay.getId() );
assertTrue( ! Hibernate.isInitialized( stay.getOldPerson() ) );
assertFalse( Hibernate.isInitialized( stay.getOldPerson() ) );
s.clear();
stay3 = (Stay) s.get( Stay.class, stay3.getId() );
assertTrue( "FetchMode.JOIN should overrides lazy options", Hibernate.isInitialized( stay3.getVeryOldPerson() ) );

View File

@ -27,7 +27,6 @@ import org.junit.Test;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import static org.junit.Assert.assertEquals;
@ -70,7 +69,6 @@ public abstract class AbstractLobTest<B extends AbstractBook, C extends Abstract
protected abstract Integer getId(C compiledCode);
@Test
@FailureExpectedWithNewMetamodel
public void testSerializableToBlob() throws Exception {
B book = createBook();
Editor editor = new Editor();

View File

@ -28,6 +28,7 @@ import org.junit.Test;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.testing.DialectChecks;
import org.hibernate.testing.FailureExpected;
import org.hibernate.testing.RequiresDialectFeature;
import static org.junit.Assert.assertEquals;
@ -145,7 +146,7 @@ public class VersionedLobTest extends AbstractLobTest<VersionedBook, VersionedCo
}
@Test
// @FailureExpected(jiraKey = "HHH-5811")
@FailureExpected(jiraKey = "HHH-5811")
public void testVersionUnchangedByteArray() throws Exception {
Session s;
Transaction tx;

View File

@ -36,7 +36,6 @@ import org.hibernate.cfg.Configuration;
import org.hibernate.criterion.Restrictions;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.stat.Statistics;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
@ -112,7 +111,6 @@ public class NaturalIdOnSingleManyToOneTest extends BaseCoreFunctionalTestCase {
assertEquals( "NaturalId cache hits should be zero", 0, stats.getNaturalIdCacheHitCount() );
assertEquals( "NaturalId Cache Puts", 0, stats.getNaturalIdCachePutCount() );
assertEquals( "NaturalId cache misses should be zero", 0, stats.getNaturalIdCacheMissCount() );
s = openSession();
tx = s.beginTransaction();
Criteria criteria = s.createCriteria( NaturalIdOnManyToOne.class );

View File

@ -38,7 +38,6 @@ import static org.junit.Assert.assertSame;
* @author Dave Stephan
* @author Gail Badner
*/
@FailureExpectedWithNewMetamodel // NPE @ AbstractCollectionPersister.java:871
public class CollectionAliasTest extends BaseCoreFunctionalTestCase {
@TestForIssue( jiraKey = "HHH-7545" )

View File

@ -33,7 +33,6 @@ import org.hibernate.testing.FailureExpectedWithNewMetamodel;
*
* @author Gail Badner
*/
@FailureExpectedWithNewMetamodel // NPE @ AbstractCollectionPersister.java:871
public class ReorderedMappingsCollectionAliasTest extends CollectionAliasTest {
@Override

View File

@ -30,7 +30,6 @@ import org.hibernate.Session;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Configuration;
import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import static org.junit.Assert.assertEquals;
@ -56,7 +55,6 @@ public class CustomDirtinessStrategyTest extends BaseCoreFunctionalTestCase {
}
@Test
@FailureExpectedWithNewMetamodel
public void testOnlyCustomStrategy() {
Session session = openSession();
session.beginTransaction();

View File

@ -60,7 +60,6 @@ import static org.junit.Assert.assertTrue;
public class TestAutoFlushBeforeQueryExecution extends BaseCoreFunctionalTestCase {
@Test
@FailureExpectedWithNewMetamodel
public void testAutoflushIsRequired() {
Session s = openSession();
Transaction txn = s.beginTransaction();
@ -137,7 +136,6 @@ public class TestAutoFlushBeforeQueryExecution extends BaseCoreFunctionalTestCas
}
@Test
@FailureExpectedWithNewMetamodel
public void testAutoflushIsNotRequiredWithUnrelatedCollectionChange() {
Session s = openSession();
Transaction txn = s.beginTransaction();

View File

@ -37,7 +37,6 @@ import org.hibernate.event.spi.PreUpdateEventListener;
import org.hibernate.integrator.spi.Integrator;
import org.hibernate.metamodel.spi.MetadataImplementor;
import org.hibernate.service.spi.SessionFactoryServiceRegistry;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
@ -48,7 +47,6 @@ import static org.junit.Assert.assertTrue;
* @author Steve Ebersole
*/
@TestForIssue( jiraKey = "HHH-2763" )
@FailureExpectedWithNewMetamodel
public class TestCollectionInitializingDuringFlush extends BaseCoreFunctionalTestCase {
@Test
public void testInitializationDuringFlush() {

View File

@ -30,7 +30,6 @@ import org.junit.Test;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
@ -62,7 +61,6 @@ public class CachedMutableNaturalIdTest extends BaseCoreFunctionalTestCase {
}
@Test
@FailureExpectedWithNewMetamodel
public void testNaturalIdChangedWhileAttached() {
Session session = openSession();
session.beginTransaction();
@ -92,7 +90,6 @@ public class CachedMutableNaturalIdTest extends BaseCoreFunctionalTestCase {
}
@Test
@FailureExpectedWithNewMetamodel
public void testNaturalIdChangedWhileDetached() {
Session session = openSession();
session.beginTransaction();
@ -171,7 +168,6 @@ public class CachedMutableNaturalIdTest extends BaseCoreFunctionalTestCase {
@Test
@TestForIssue( jiraKey = "HHH-7278" )
@FailureExpectedWithNewMetamodel
public void testChangedNaturalIdCachedAfterTransactionSuccess() {
Session session = openSession();
session.beginTransaction();
@ -205,7 +201,6 @@ public class CachedMutableNaturalIdTest extends BaseCoreFunctionalTestCase {
@Test
@TestForIssue( jiraKey = "HHH-7278" )
@FailureExpectedWithNewMetamodel
public void testChangedNaturalIdNotCachedAfterTransactionFailure() {
Session session = openSession();
session.beginTransaction();
@ -239,7 +234,6 @@ public class CachedMutableNaturalIdTest extends BaseCoreFunctionalTestCase {
}
@Test
@FailureExpectedWithNewMetamodel
public void testNaturalIdRecachingWhenNeeded() {
Session session = openSession();
session.getSessionFactory().getStatistics().clear();
@ -276,7 +270,6 @@ public class CachedMutableNaturalIdTest extends BaseCoreFunctionalTestCase {
@Test
@TestForIssue( jiraKey = "HHH-7245" )
@FailureExpectedWithNewMetamodel
public void testNaturalIdChangeAfterResolveEntityFrom2LCache() {
Session session = openSession();
session.beginTransaction();

View File

@ -28,7 +28,6 @@ import org.junit.Test;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
@ -47,7 +46,6 @@ public class ByteTest extends BaseCoreFunctionalTestCase {
@Test
@TestForIssue( jiraKey = "HHH-6533" )
@FailureExpectedWithNewMetamodel
public void testByteDataPersistenceAndRetrieval() {
Session session = openSession();
Transaction transaction = session.beginTransaction();