From b0c27562f492117929aae72cd7182db5e76e3f7e Mon Sep 17 00:00:00 2001 From: Vlad Mihalcea Date: Wed, 13 Dec 2017 20:39:45 +0200 Subject: [PATCH] Fix User Guide tests failing and triggereing other 2nd-level cache tests to fail as well --- .../org/hibernate/userguide/caching/SecondLevelCacheTest.java | 2 +- .../main/java/org/hibernate/internal/SessionFactoryImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/src/test/java/org/hibernate/userguide/caching/SecondLevelCacheTest.java b/documentation/src/test/java/org/hibernate/userguide/caching/SecondLevelCacheTest.java index 42f4246fc2..981455a02d 100644 --- a/documentation/src/test/java/org/hibernate/userguide/caching/SecondLevelCacheTest.java +++ b/documentation/src/test/java/org/hibernate/userguide/caching/SecondLevelCacheTest.java @@ -58,7 +58,7 @@ public class SecondLevelCacheTest extends BaseEntityManagerFunctionalTestCase { options.put( AvailableSettings.CACHE_REGION_FACTORY, EhCacheRegionFactory.class.getName() ); options.put( AvailableSettings.USE_QUERY_CACHE, Boolean.TRUE.toString() ); options.put( AvailableSettings.GENERATE_STATISTICS, Boolean.TRUE.toString() ); - options.put( AvailableSettings.CACHE_REGION_PREFIX, "" ); + //options.put( AvailableSettings.CACHE_REGION_PREFIX, "" ); } @Test diff --git a/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java b/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java index 61b3bc09e1..9576d13e1a 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java @@ -386,7 +386,7 @@ public final class SessionFactoryImpl implements SessionFactoryImplementor { integrator.disintegrate( this, serviceRegistry ); integratorObserver.integrators.remove( integrator ); } - serviceRegistry.destroy(); + close(); throw e; } }