missed files on last merge

This commit is contained in:
Steve Ebersole 2012-09-10 14:23:01 -05:00
parent af115fe5a8
commit 563a0e4b7a
10 changed files with 28 additions and 11 deletions

View File

@ -73,7 +73,7 @@ public class MetadataImplTest extends BaseUnitTestCase {
@Test @Test
public void testAddingPackageName() { public void testAddingPackageName() {
MetadataSources sources = new MetadataSources( new StandardServiceRegistryBuilder().buildServiceRegistry() ); MetadataSources sources = new MetadataSources( new StandardServiceRegistryBuilder().buildServiceRegistry() );
sources.addPackage( "org.hibernate.metamodel.source.internal" ); sources.addPackage( "org.hibernate.metamodel.internal.source" );
MetadataImpl metadata = (MetadataImpl) sources.buildMetadata(); MetadataImpl metadata = (MetadataImpl) sources.buildMetadata();
assertFetchProfile( metadata ); assertFetchProfile( metadata );
@ -82,7 +82,7 @@ public class MetadataImplTest extends BaseUnitTestCase {
@Test @Test
public void testAddingPackageNameWithTrailingDot() { public void testAddingPackageNameWithTrailingDot() {
MetadataSources sources = new MetadataSources( new StandardServiceRegistryBuilder().buildServiceRegistry() ); MetadataSources sources = new MetadataSources( new StandardServiceRegistryBuilder().buildServiceRegistry() );
sources.addPackage( "org.hibernate.metamodel.source.internal." ); sources.addPackage( "org.hibernate.metamodel.internal.source." );
MetadataImpl metadata = (MetadataImpl) sources.buildMetadata(); MetadataImpl metadata = (MetadataImpl) sources.buildMetadata();
assertFetchProfile( metadata ); assertFetchProfile( metadata );

View File

@ -32,9 +32,11 @@ import junit.framework.Assert;
import org.hibernate.Session; import org.hibernate.Session;
import org.hibernate.Transaction; import org.hibernate.Transaction;
import org.hibernate.test.annotations.derivedidentities.e1.b.specjmapid.Item; import org.hibernate.test.annotations.derivedidentities.e1.b.specjmapid.Item;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.junit.Test; import org.junit.Test;
@FailureExpectedWithNewMetamodel // i think the whole SpecJ "partially generated id" thing causes problems in the new code
public class CompositeKeyDeleteTest extends BaseCoreFunctionalTestCase { public class CompositeKeyDeleteTest extends BaseCoreFunctionalTestCase {
public String[] getMappings() { public String[] getMappings() {

View File

@ -5,6 +5,8 @@ import static org.junit.Assert.assertEquals;
import org.hibernate.Session; import org.hibernate.Session;
import org.hibernate.cfg.Configuration; import org.hibernate.cfg.Configuration;
import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.PersistentClass;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.hibernate.type.SerializableToBlobType; import org.hibernate.type.SerializableToBlobType;
import org.hibernate.type.Type; import org.hibernate.type.Type;
@ -15,6 +17,7 @@ import org.junit.Test;
* *
* @author Janario Oliveira * @author Janario Oliveira
*/ */
@FailureExpectedWithNewMetamodel // TypeDef w/o name
public class SerializableToBlobTypeTest extends BaseCoreFunctionalTestCase { public class SerializableToBlobTypeTest extends BaseCoreFunctionalTestCase {
@Test @Test
public void testTypeDefinition() { public void testTypeDefinition() {

View File

@ -31,12 +31,14 @@ import org.hibernate.Session;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
/** /**
* @author Elizabeth Chatman * @author Elizabeth Chatman
* @author Steve Ebersole * @author Steve Ebersole
*/ */
@FailureExpectedWithNewMetamodel // missing unique-constraint default naming
public class EntityMapTest extends BaseCoreFunctionalTestCase { public class EntityMapTest extends BaseCoreFunctionalTestCase {
@Override @Override
protected Class<?>[] getAnnotatedClasses() { protected Class<?>[] getAnnotatedClasses() {

View File

@ -26,6 +26,8 @@ package org.hibernate.test.collectionalias;
import org.junit.Test; import org.junit.Test;
import org.hibernate.Session; import org.hibernate.Session;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.TestForIssue; import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
@ -36,6 +38,7 @@ import static org.junit.Assert.assertSame;
* @author Dave Stephan * @author Dave Stephan
* @author Gail Badner * @author Gail Badner
*/ */
@FailureExpectedWithNewMetamodel // NPE @ AbstractCollectionPersister.java:871
public class CollectionAliasTest extends BaseCoreFunctionalTestCase { public class CollectionAliasTest extends BaseCoreFunctionalTestCase {
@TestForIssue( jiraKey = "HHH-7545" ) @TestForIssue( jiraKey = "HHH-7545" )

View File

@ -23,14 +23,17 @@
*/ */
package org.hibernate.test.collectionalias; package org.hibernate.test.collectionalias;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
/** /**
* The bug fixed by HHH-7545 showed showed different results depending on the order * The bug fixed by HHH-7545 showed showed different results depending on the order
* in which entity mappings were processed. * in which entity mappings were processed.
* *
* This mappings are in the opposite order here than in CollectionAliasTest. * This mappings are in the opposite order here than in CollectionAliasTest.
* *
* @Author Gail Badner * @author Gail Badner
*/ */
@FailureExpectedWithNewMetamodel // NPE @ AbstractCollectionPersister.java:871
public class ReorderedMappingsCollectionAliasTest extends CollectionAliasTest { public class ReorderedMappingsCollectionAliasTest extends CollectionAliasTest {
@Override @Override

View File

@ -28,11 +28,13 @@ import org.hibernate.criterion.Restrictions;
import org.junit.Test; import org.junit.Test;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
/** /**
* @author Steve Ebersole * @author Steve Ebersole
*/ */
@FailureExpectedWithNewMetamodel // NPE @ Binder.bindManyToOneAttribute(Binder.java:1053)
public class JoinSelfReferentialFetchProfileTest extends BaseCoreFunctionalTestCase { public class JoinSelfReferentialFetchProfileTest extends BaseCoreFunctionalTestCase {
@Override @Override
protected Class<?>[] getAnnotatedClasses() { protected Class<?>[] getAnnotatedClasses() {

View File

@ -28,6 +28,7 @@ import org.hibernate.Session;
import org.junit.Test; import org.junit.Test;
import org.hibernate.testing.DialectChecks; import org.hibernate.testing.DialectChecks;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.RequiresDialectFeature; import org.hibernate.testing.RequiresDialectFeature;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
@ -36,6 +37,7 @@ import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
* @author Steve Ebersole * @author Steve Ebersole
*/ */
@RequiresDialectFeature( DialectChecks.SupportsIdentityColumns.class ) @RequiresDialectFeature( DialectChecks.SupportsIdentityColumns.class )
@FailureExpectedWithNewMetamodel // NPE @ JoinedSubclassEntityPersister.getIdentifierColumnNames(JoinedSubclassEntityPersister.java:730)
public class JoinedSubclassHierarchyWithIdentityGenerationTest extends BaseCoreFunctionalTestCase { public class JoinedSubclassHierarchyWithIdentityGenerationTest extends BaseCoreFunctionalTestCase {
@Override @Override
protected Class<?>[] getAnnotatedClasses() { protected Class<?>[] getAnnotatedClasses() {

View File

@ -43,6 +43,9 @@ import org.hibernate.EntityNameResolver;
import org.hibernate.Interceptor; import org.hibernate.Interceptor;
import org.hibernate.SessionFactory; import org.hibernate.SessionFactory;
import org.hibernate.SessionFactoryObserver; import org.hibernate.SessionFactoryObserver;
import org.hibernate.boot.registry.BootstrapServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import org.hibernate.boot.spi.CacheRegionDefinition; import org.hibernate.boot.spi.CacheRegionDefinition;
import org.hibernate.boot.spi.JaccDefinition; import org.hibernate.boot.spi.JaccDefinition;
import org.hibernate.cache.spi.access.AccessType; import org.hibernate.cache.spi.access.AccessType;
@ -72,10 +75,7 @@ import org.hibernate.metamodel.MetadataSourceProcessingOrder;
import org.hibernate.metamodel.MetadataSources; import org.hibernate.metamodel.MetadataSources;
import org.hibernate.metamodel.SessionFactoryBuilder; import org.hibernate.metamodel.SessionFactoryBuilder;
import org.hibernate.proxy.EntityNotFoundDelegate; import org.hibernate.proxy.EntityNotFoundDelegate;
import org.hibernate.service.BootstrapServiceRegistry;
import org.hibernate.service.ServiceRegistry; import org.hibernate.service.ServiceRegistry;
import org.hibernate.service.ServiceRegistryBuilder;
import org.hibernate.service.classloading.spi.ClassLoaderService;
import org.hibernate.service.spi.ServiceRegistryImplementor; import org.hibernate.service.spi.ServiceRegistryImplementor;
import static org.hibernate.jaxb.spi.cfg.JaxbHibernateConfiguration.JaxbSessionFactory.JaxbMapping; import static org.hibernate.jaxb.spi.cfg.JaxbHibernateConfiguration.JaxbSessionFactory.JaxbMapping;
@ -161,7 +161,7 @@ public class EntityManagerFactoryBuilderUsingMetamodelImpl implements EntityMana
@Override @Override
public EntityManagerFactory buildEntityManagerFactory() { public EntityManagerFactory buildEntityManagerFactory() {
final ServiceRegistryBuilder serviceRegistryBuilder = new ServiceRegistryBuilder( bootstrapServiceRegistry ); final StandardServiceRegistryBuilder serviceRegistryBuilder = new StandardServiceRegistryBuilder( bootstrapServiceRegistry );
final SpecialProperties specialProperties = processProperties( serviceRegistryBuilder ); final SpecialProperties specialProperties = processProperties( serviceRegistryBuilder );
final MetadataBuilder metadataBuilder = metadataSources.getMetadataBuilder(); final MetadataBuilder metadataBuilder = metadataSources.getMetadataBuilder();
@ -188,7 +188,7 @@ public class EntityManagerFactoryBuilderUsingMetamodelImpl implements EntityMana
); );
} }
private SpecialProperties processProperties(ServiceRegistryBuilder serviceRegistryBuilder) { private SpecialProperties processProperties(StandardServiceRegistryBuilder serviceRegistryBuilder) {
final SpecialProperties specialProperties = new SpecialProperties(); final SpecialProperties specialProperties = new SpecialProperties();
applyJdbcConnectionProperties( serviceRegistryBuilder ); applyJdbcConnectionProperties( serviceRegistryBuilder );
@ -293,7 +293,7 @@ public class EntityManagerFactoryBuilderUsingMetamodelImpl implements EntityMana
return specialProperties; return specialProperties;
} }
private void applyJdbcConnectionProperties(ServiceRegistryBuilder serviceRegistryBuilder) { private void applyJdbcConnectionProperties(StandardServiceRegistryBuilder serviceRegistryBuilder) {
if ( persistenceUnit.getJtaDataSource() != null ) { if ( persistenceUnit.getJtaDataSource() != null ) {
serviceRegistryBuilder.applySetting( Environment.DATASOURCE, persistenceUnit.getJtaDataSource() ); serviceRegistryBuilder.applySetting( Environment.DATASOURCE, persistenceUnit.getJtaDataSource() );
} }
@ -320,7 +320,7 @@ public class EntityManagerFactoryBuilderUsingMetamodelImpl implements EntityMana
} }
} }
private void applyTransactionProperties(ServiceRegistryBuilder serviceRegistryBuilder, SpecialProperties specialProperties) { private void applyTransactionProperties(StandardServiceRegistryBuilder serviceRegistryBuilder, SpecialProperties specialProperties) {
PersistenceUnitTransactionType txnType = PersistenceUnitTransactionTypeHelper.interpretTransactionType( PersistenceUnitTransactionType txnType = PersistenceUnitTransactionTypeHelper.interpretTransactionType(
configurationValues.get( AvailableSettings.TRANSACTION_TYPE ) configurationValues.get( AvailableSettings.TRANSACTION_TYPE )
); );

View File

@ -25,9 +25,9 @@ package org.hibernate.jpa.test.connection;
import javax.persistence.EntityManagerFactory; import javax.persistence.EntityManagerFactory;
import java.io.File; import java.io.File;
import org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl;
import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.jpa.HibernatePersistenceProvider; import org.hibernate.jpa.HibernatePersistenceProvider;
import org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl;
import org.junit.Test; import org.junit.Test;