HHH-11271 Fix hidden failure in InfinispanRegionFactoryTestCase#testTimestampValidation
(cherry picked from commit c308bcbe7d
)
This commit is contained in:
parent
da80a6a548
commit
eb73985c9e
|
@ -296,14 +296,16 @@ public class InfinispanRegionFactoryTestCase {
|
||||||
|
|
||||||
@Test(expected = CacheException.class)
|
@Test(expected = CacheException.class)
|
||||||
public void testTimestampValidation() {
|
public void testTimestampValidation() {
|
||||||
|
final String timestamps = "org.hibernate.cache.spi.UpdateTimestampsCache";
|
||||||
Properties p = createProperties();
|
Properties p = createProperties();
|
||||||
final DefaultCacheManager manager = new DefaultCacheManager(GlobalConfigurationBuilder.defaultClusteredBuilder().build());
|
final DefaultCacheManager manager = new DefaultCacheManager(GlobalConfigurationBuilder.defaultClusteredBuilder().build());
|
||||||
ConfigurationBuilder builder = new ConfigurationBuilder();
|
ConfigurationBuilder builder = new ConfigurationBuilder();
|
||||||
builder.clustering().cacheMode(CacheMode.INVALIDATION_SYNC);
|
builder.clustering().cacheMode(CacheMode.INVALIDATION_SYNC);
|
||||||
manager.defineConfiguration( DEF_TIMESTAMPS_RESOURCE, builder.build() );
|
manager.defineConfiguration( DEF_TIMESTAMPS_RESOURCE, builder.build() );
|
||||||
try {
|
try {
|
||||||
InfinispanRegionFactory factory = createRegionFactory(manager, p, null);
|
InfinispanRegionFactory factory = createRegionFactory( manager, p, null );
|
||||||
factory.start(null, p);
|
factory.start( CacheTestUtil.sfOptionsForStart(), p );
|
||||||
|
TimestampsRegionImpl region = (TimestampsRegionImpl) factory.buildTimestampsRegion( timestamps, p );
|
||||||
fail( "Should have failed saying that invalidation is not allowed for timestamp caches." );
|
fail( "Should have failed saying that invalidation is not allowed for timestamp caches." );
|
||||||
} finally {
|
} finally {
|
||||||
TestingUtil.killCacheManagers( manager );
|
TestingUtil.killCacheManagers( manager );
|
||||||
|
|
Loading…
Reference in New Issue