HHH-7549 fixing failing test
This commit is contained in:
parent
7042790a53
commit
11270a0f12
|
@ -36,7 +36,6 @@ import static org.junit.Assert.assertEquals;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
@TestForIssue( jiraKey = "HHH-7138" )
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public class JpaSpecVersionValueUpdatingTest extends BaseCoreFunctionalTestCase {
|
||||
@Override
|
||||
protected Class<?>[] getAnnotatedClasses() {
|
||||
|
@ -44,6 +43,7 @@ public class JpaSpecVersionValueUpdatingTest extends BaseCoreFunctionalTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public void testVersionNotIncrementedOnModificationOfNonOwningCollectionNonCascaded() {
|
||||
Session session = openSession();
|
||||
session.beginTransaction();
|
||||
|
|
|
@ -11,8 +11,10 @@ import java.util.Map;
|
|||
import org.hamcrest.CoreMatchers;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.Transaction;
|
||||
import org.hibernate.cache.ehcache.EhCacheRegionFactory;
|
||||
import org.hibernate.cache.ehcache.internal.strategy.ItemValueExtractor;
|
||||
import org.hibernate.cache.spi.access.SoftLock;
|
||||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.cfg.Configuration;
|
||||
import org.hibernate.stat.QueryStatistics;
|
||||
import org.hibernate.stat.SecondLevelCacheStatistics;
|
||||
|
@ -23,6 +25,7 @@ import org.hibernate.test.domain.Item;
|
|||
import org.hibernate.test.domain.Person;
|
||||
import org.hibernate.test.domain.PhoneNumber;
|
||||
import org.hibernate.test.domain.VersionedItem;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -30,19 +33,28 @@ import org.junit.Test;
|
|||
* @author Chris Dennis
|
||||
* @author Brett Meyer
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public class HibernateCacheTest extends BaseCoreFunctionalTestCase {
|
||||
|
||||
private static final String REGION_PREFIX = "hibernate.test.";
|
||||
|
||||
@Override
|
||||
protected void configure(Configuration config) {
|
||||
System.setProperty( "derby.system.home", "target/derby" );
|
||||
config.configure( "hibernate-config/hibernate.cfg.xml" );
|
||||
config.setProperty( AvailableSettings.USE_QUERY_CACHE, "true");
|
||||
config.setProperty( AvailableSettings.USE_STRUCTURED_CACHE, "true" );
|
||||
config.setProperty( AvailableSettings.GENERATE_STATISTICS, "true" );
|
||||
config.setProperty( AvailableSettings.CACHE_REGION_FACTORY, EhCacheRegionFactory.class.getName());
|
||||
config.setProperty( "net.sf.ehcache.configurationResourceName", "/hibernate-config/ehcache.xml" );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void afterSessionFactoryBuilt() {
|
||||
sessionFactory().getStatistics().setStatisticsEnabled( true );
|
||||
protected String getBaseForMappings() {
|
||||
return "hibernate-config/domain/";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String[] getMappings() {
|
||||
return new String[]{"Account.hbm.xml", "Event.hbm.xml", "HolidayCalendar.hbm.xml", "Item.hbm.xml", "Person.hbm.xml", "PhoneNumber.hbm.xml"};
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!DOCTYPE hibernate-configuration PUBLIC
|
||||
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
|
||||
|
||||
<hibernate-configuration>
|
||||
|
||||
<session-factory>
|
||||
|
||||
<!-- Database connection settings -->
|
||||
<!-- <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
|
||||
<property name="connection.url">jdbc:hsqldb:hsql://localhost/TestDB</property> -->
|
||||
|
||||
<property name="connection.driver_class">org.h2.Driver</property>
|
||||
<property name="connection.url">jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE</property>
|
||||
<property name="connection.username">sa</property>
|
||||
<property name="connection.password"></property>
|
||||
|
||||
<!-- JDBC connection pool (use the built-in) -->
|
||||
<property name="connection.pool_size">1</property>
|
||||
|
||||
<!-- SQL dialect -->
|
||||
<property name="dialect">
|
||||
org.hibernate.dialect.H2Dialect
|
||||
</property>
|
||||
|
||||
<!-- Enable Hibernate's automatic session context management -->
|
||||
<property name="current_session_context_class">thread</property>
|
||||
|
||||
<property name="cache.use_query_cache">true</property>
|
||||
<property name="cache.use_second_level_cache">true</property>
|
||||
<property name="cache.use_structured_entries">true</property>
|
||||
<property name="cache.region.factory_class">org.hibernate.cache.EhCacheRegionFactory</property>
|
||||
<property name="net.sf.ehcache.configurationResourceName">/hibernate-config/ehcache.xml</property>
|
||||
<!-- Echo all executed SQL to stdout -->
|
||||
<property name="show_sql">true</property>
|
||||
|
||||
<mapping resource="hibernate-config/domain/Event.hbm.xml"/>
|
||||
<mapping resource="hibernate-config/domain/Person.hbm.xml"/>
|
||||
<mapping resource="hibernate-config/domain/PhoneNumber.hbm.xml"/>
|
||||
<mapping resource="hibernate-config/domain/Account.hbm.xml"/>
|
||||
<mapping resource="hibernate-config/domain/HolidayCalendar.hbm.xml"/>
|
||||
|
||||
<mapping resource="hibernate-config/domain/Item.hbm.xml"/>
|
||||
|
||||
</session-factory>
|
||||
|
||||
</hibernate-configuration>
|
|
@ -21,7 +21,7 @@
|
|||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301 USA
|
||||
#
|
||||
hibernate.dialect org.hibernate.dialect.H2Dialect
|
||||
hibernate.dialect org.hibernate.dialect.H2Dialect
|
||||
hibernate.connection.driver_class org.h2.Driver
|
||||
hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE
|
||||
hibernate.connection.username sa
|
||||
|
@ -32,3 +32,4 @@ hibernate.cache.region_prefix hibernate.test
|
|||
|
||||
# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle
|
||||
hibernate.jdbc.batch_versioned_data true
|
||||
hibernate.show_sql true
|
||||
|
|
Loading…
Reference in New Issue