diff --git a/libraries-data/pom.xml b/libraries-data/pom.xml index f0f5338560..a6f8730538 100644 --- a/libraries-data/pom.xml +++ b/libraries-data/pom.xml @@ -174,7 +174,7 @@ 2.8.2 1.1.1 1.5.0 - 3.8.4 + 5.2.0 0.15.0 2.2.0 1.6.0.1 diff --git a/libraries-data/src/test/java/com/baeldung/jcache/CacheLoaderIntegrationTest.java b/libraries-data/src/test/java/com/baeldung/jcache/CacheLoaderIntegrationTest.java index 8017418eba..510083280d 100644 --- a/libraries-data/src/test/java/com/baeldung/jcache/CacheLoaderIntegrationTest.java +++ b/libraries-data/src/test/java/com/baeldung/jcache/CacheLoaderIntegrationTest.java @@ -16,21 +16,22 @@ import org.junit.Test; public class CacheLoaderIntegrationTest { private static final String CACHE_NAME = "SimpleCache"; + private static final String HAZELCAST_MEMBER_CACHING_PROVIDER = "com.hazelcast.cache.HazelcastMemberCachingProvider"; private Cache cache; @Before public void setup() { // Adding fully qualified class name because of multiple Cache Provider (Ignite and Hazelcast) - CachingProvider cachingProvider = Caching.getCachingProvider("com.hazelcast.cache.HazelcastCachingProvider"); + CachingProvider cachingProvider = Caching.getCachingProvider(HAZELCAST_MEMBER_CACHING_PROVIDER); CacheManager cacheManager = cachingProvider.getCacheManager(); MutableConfiguration config = new MutableConfiguration().setReadThrough(true).setCacheLoaderFactory(new FactoryBuilder.SingletonFactory<>(new SimpleCacheLoader())); - this.cache = cacheManager.createCache("SimpleCache", config); + this.cache = cacheManager.createCache( CACHE_NAME, config ); } @After public void tearDown() { - Caching.getCachingProvider("com.hazelcast.cache.HazelcastCachingProvider").getCacheManager().destroyCache(CACHE_NAME); + Caching.getCachingProvider(HAZELCAST_MEMBER_CACHING_PROVIDER).getCacheManager().destroyCache(CACHE_NAME); } @Test