HHH-11271 Fix hidden failure in InfinispanRegionFactoryTestCase#testTimestampValidation

(cherry picked from commit c308bcbe7d)
This commit is contained in:
Sanne Grinovero 2016-11-21 17:19:30 +00:00 committed by Gail Badner
parent da80a6a548
commit eb73985c9e
1 changed files with 4 additions and 2 deletions

View File

@ -296,6 +296,7 @@ public class InfinispanRegionFactoryTestCase {
@Test(expected = CacheException.class)
public void testTimestampValidation() {
final String timestamps = "org.hibernate.cache.spi.UpdateTimestampsCache";
Properties p = createProperties();
final DefaultCacheManager manager = new DefaultCacheManager(GlobalConfigurationBuilder.defaultClusteredBuilder().build());
ConfigurationBuilder builder = new ConfigurationBuilder();
@ -303,7 +304,8 @@ public class InfinispanRegionFactoryTestCase {
manager.defineConfiguration( DEF_TIMESTAMPS_RESOURCE, builder.build() );
try {
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." );
} finally {
TestingUtil.killCacheManagers( manager );