Re-enabled OneToOneFormulaTest

This commit is contained in:
Andrea Boriero 2021-05-07 09:59:08 +02:00
parent 05ff370488
commit 867dd52ab3
7 changed files with 17 additions and 19 deletions

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Address.java 10977 2006-12-12 23:28:04Z steve.ebersole@jboss.com $ //$Id: Address.java 10977 2006-12-12 23:28:04Z steve.ebersole@jboss.com $
package org.hibernate.test.onetoone.formula; package org.hibernate.orm.test.onetoone.formula;
import java.io.Serializable; import java.io.Serializable;
/** /**

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/ */
package org.hibernate.test.onetoone.formula; package org.hibernate.orm.test.onetoone.formula;
import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.CriteriaQuery;
@ -14,22 +14,15 @@ import javax.persistence.criteria.Root;
import org.hibernate.Hibernate; import org.hibernate.Hibernate;
import org.hibernate.boot.MetadataBuilder; import org.hibernate.boot.MetadataBuilder;
import org.hibernate.boot.SessionFactoryBuilder;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment; import org.hibernate.cfg.Environment;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.Oracle8iDialect;
import org.hibernate.dialect.OracleDialect; import org.hibernate.dialect.OracleDialect;
import org.hibernate.orm.test.immutable.ImmutableTest;
import org.hibernate.type.AbstractSingleColumnStandardBasicType; import org.hibernate.type.AbstractSingleColumnStandardBasicType;
import org.hibernate.type.TextType; import org.hibernate.type.TextType;
import org.hibernate.type.descriptor.jdbc.ClobTypeDescriptor; import org.hibernate.type.descriptor.jdbc.ClobTypeDescriptor;
import org.hibernate.testing.TestForIssue; import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.orm.junit.BaseSessionFactoryFunctionalTest; import org.hibernate.testing.orm.junit.BaseSessionFactoryFunctionalTest;
import org.hibernate.testing.orm.junit.DialectContext;
import org.hibernate.testing.orm.junit.DomainModel;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -61,9 +54,9 @@ public class OneToOneFormulaTest extends BaseSessionFactoryFunctionalTest {
@Override @Override
protected void applySettings(StandardServiceRegistryBuilder builder) { protected void applySettings(StandardServiceRegistryBuilder builder) {
builder.applySetting( Environment.USE_SECOND_LEVEL_CACHE, "false" ); builder.applySetting( Environment.USE_SECOND_LEVEL_CACHE, "false" );
builder.applySetting( Environment.GENERATE_STATISTICS, "true" ); builder.applySetting( Environment.GENERATE_STATISTICS, "true" );
builder.applySetting( Environment.DEFAULT_BATCH_FETCH_SIZE, "2" ); builder.applySetting( Environment.DEFAULT_BATCH_FETCH_SIZE, "2" );
} }
@Override @Override
@ -75,7 +68,7 @@ public class OneToOneFormulaTest extends BaseSessionFactoryFunctionalTest {
@Override @Override
public String[] getOrmXmlFiles() { public String[] getOrmXmlFiles() {
return new String[] { "org/hibernate/test/onetoone/formula/Person.hbm.xml" }; return new String[] { "org/hibernate/orm/test/onetoone/formula/Person.hbm.xml" };
} }

View File

@ -9,7 +9,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN" "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="org.hibernate.test.onetoone.formula"> <hibernate-mapping package="org.hibernate.orm.test.onetoone.formula">
<class name="Person"> <class name="Person">
<id name="name"/> <id name="name"/>

View File

@ -6,7 +6,7 @@
*/ */
//$Id: Person.java 10977 2006-12-12 23:28:04Z steve.ebersole@jboss.com $ //$Id: Person.java 10977 2006-12-12 23:28:04Z steve.ebersole@jboss.com $
package org.hibernate.test.onetoone.formula; package org.hibernate.orm.test.onetoone.formula;
import java.io.Serializable; import java.io.Serializable;
/** /**

View File

@ -25,8 +25,8 @@ import org.hibernate.type.Type;
import org.junit.Test; import org.junit.Test;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.hibernate.test.onetoone.formula.Address; import org.hibernate.orm.test.onetoone.formula.Address;
import org.hibernate.test.onetoone.formula.Person; import org.hibernate.orm.test.onetoone.formula.Person;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;

View File

@ -11,7 +11,7 @@ import org.hibernate.persister.entity.EntityPersister;
import org.junit.Test; import org.junit.Test;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.hibernate.test.onetoone.formula.Address; import org.hibernate.orm.test.onetoone.formula.Address;
/** /**
* @author Steve Ebersole * @author Steve Ebersole

View File

@ -19,6 +19,7 @@ import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.boot.spi.MetadataImplementor; import org.hibernate.boot.spi.MetadataImplementor;
import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Environment; import org.hibernate.cfg.Environment;
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.engine.spi.SessionImplementor; import org.hibernate.engine.spi.SessionImplementor;
@ -77,7 +78,7 @@ public abstract class BaseSessionFactoryFunctionalTest
return true; return true;
} }
protected void applySettings(StandardServiceRegistryBuilder builer) { protected void applySettings(StandardServiceRegistryBuilder builder) {
} }
@Override @Override
@ -206,4 +207,8 @@ public abstract class BaseSessionFactoryFunctionalTest
return sessionFactoryScope.fromSession( action ); return sessionFactoryScope.fromSession( action );
} }
protected Dialect getDialect(){
return DialectContext.getDialect();
}
} }