Use NOCACHE for all envers tests since they can't cope with values to be skipped
This commit is contained in:
parent
cff02f6726
commit
f4b1e00ddf
|
@ -43,6 +43,8 @@ public abstract class AbstractOneSessionTest extends AbstractEnversTest {
|
||||||
config = new Configuration();
|
config = new Configuration();
|
||||||
URL url = Thread.currentThread().getContextClassLoader().getResource( getHibernateConfigurationFileName() );
|
URL url = Thread.currentThread().getContextClassLoader().getResource( getHibernateConfigurationFileName() );
|
||||||
config.configure( new File( url.toURI() ) );
|
config.configure( new File( url.toURI() ) );
|
||||||
|
// Envers tests expect sequences to not skip values...
|
||||||
|
config.setProperty( EnversSettings.REVISION_SEQUENCE_NOCACHE, "true" );
|
||||||
|
|
||||||
String auditStrategy = getAuditStrategy();
|
String auditStrategy = getAuditStrategy();
|
||||||
if ( auditStrategy != null && !"".equals( auditStrategy ) ) {
|
if ( auditStrategy != null && !"".equals( auditStrategy ) ) {
|
||||||
|
|
|
@ -76,6 +76,8 @@ public abstract class BaseEnversFunctionalTestCase extends BaseNonConfigCoreFunc
|
||||||
super.addSettings( settings );
|
super.addSettings( settings );
|
||||||
|
|
||||||
settings.put( EnversSettings.USE_REVISION_ENTITY_WITH_NATIVE_ID, "false" );
|
settings.put( EnversSettings.USE_REVISION_ENTITY_WITH_NATIVE_ID, "false" );
|
||||||
|
// Envers tests expect sequences to not skip values...
|
||||||
|
settings.put( EnversSettings.REVISION_SEQUENCE_NOCACHE, "true" );
|
||||||
|
|
||||||
if ( getAuditStrategy() != null ) {
|
if ( getAuditStrategy() != null ) {
|
||||||
settings.put( EnversSettings.AUDIT_STRATEGY, getAuditStrategy() );
|
settings.put( EnversSettings.AUDIT_STRATEGY, getAuditStrategy() );
|
||||||
|
|
|
@ -157,6 +157,8 @@ public abstract class BaseEnversJPAFunctionalTestCase extends AbstractEnversTest
|
||||||
SharedDriverManagerConnectionProviderImpl.getInstance()
|
SharedDriverManagerConnectionProviderImpl.getInstance()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
// Envers tests expect sequences to not skip values...
|
||||||
|
config.put( EnversSettings.REVISION_SEQUENCE_NOCACHE, "true" );
|
||||||
addConfigOptions( config );
|
addConfigOptions( config );
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
|
|
|
@ -44,7 +44,6 @@ public class ValidityAuditStrategyManyToManyTest extends BaseEnversJPAFunctional
|
||||||
@Override
|
@Override
|
||||||
protected void addConfigOptions(Map options) {
|
protected void addConfigOptions(Map options) {
|
||||||
options.put( EnversSettings.AUDIT_STRATEGY, "org.hibernate.envers.strategy.ValidityAuditStrategy" );
|
options.put( EnversSettings.AUDIT_STRATEGY, "org.hibernate.envers.strategy.ValidityAuditStrategy" );
|
||||||
options.put( EnversSettings.REVISION_SEQUENCE_NOCACHE, "true" );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue