[infinispan-issues] [JBoss JIRA] (ISPN-10266) Spring Cache doesn't remove the cache or update the cache configuration
Diego Lovison (Jira)
issues at jboss.org
Wed Jun 5 11:54:00 EDT 2019
[ https://issues.jboss.org/browse/ISPN-10266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Diego Lovison updated ISPN-10266:
---------------------------------
Description:
After ISPN-10171, the Spring Cache doesn't remove the cache or update the cache configuration.
I am expecting the cache to be null once it was removed from remote cache manager.
{code:java}
@Test
public final void getCacheShouldReturnNullItWasChangedByRemoteCacheManager() {
// Given
objectUnderTest = new SpringRemoteCacheManager(remoteCacheManager);
// When
objectUnderTest.getCache(TEST_CACHE_NAME);
remoteCacheManager.administration().removeCache(TEST_CACHE_NAME);
// Then
assertNull(objectUnderTest.getCache(TEST_CACHE_NAME));
}
{code}
I am expecting a different instance of the cache once the configuration was changed.
{code:java}
@Test
public final void getCacheShouldReturnDiffInstanceItWasChangedByRemoteCacheManager() {
// Given
objectUnderTest = new SpringRemoteCacheManager(remoteCacheManager);
// When
final SpringCache firstObtainedSpringCache = objectUnderTest.getCache(TEST_CACHE_NAME);
remoteCacheManager.administration().removeCache(TEST_CACHE_NAME);
remoteCacheManager.administration().createCache(TEST_CACHE_NAME, cacheManager.getDefaultCacheConfiguration());
// Then
final SpringCache secondObtainedSpringCache = objectUnderTest.getCache(TEST_CACHE_NAME);
assertNotSame(
"getCache() shouldn't have the same SpringCache instance for the same name because the config was changed",
firstObtainedSpringCache, secondObtainedSpringCache);
}
{code}
was:After ISPN-10171, the Spring Cache doesn't remove the cache or update the cache configuration
> Spring Cache doesn't remove the cache or update the cache configuration
> -----------------------------------------------------------------------
>
> Key: ISPN-10266
> URL: https://issues.jboss.org/browse/ISPN-10266
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 9.4.14.Final
> Reporter: Diego Lovison
> Assignee: Katia Aresti
> Priority: Major
>
> After ISPN-10171, the Spring Cache doesn't remove the cache or update the cache configuration.
> I am expecting the cache to be null once it was removed from remote cache manager.
> {code:java}
> @Test
> public final void getCacheShouldReturnNullItWasChangedByRemoteCacheManager() {
> // Given
> objectUnderTest = new SpringRemoteCacheManager(remoteCacheManager);
> // When
> objectUnderTest.getCache(TEST_CACHE_NAME);
> remoteCacheManager.administration().removeCache(TEST_CACHE_NAME);
> // Then
> assertNull(objectUnderTest.getCache(TEST_CACHE_NAME));
> }
> {code}
> I am expecting a different instance of the cache once the configuration was changed.
> {code:java}
> @Test
> public final void getCacheShouldReturnDiffInstanceItWasChangedByRemoteCacheManager() {
> // Given
> objectUnderTest = new SpringRemoteCacheManager(remoteCacheManager);
> // When
> final SpringCache firstObtainedSpringCache = objectUnderTest.getCache(TEST_CACHE_NAME);
> remoteCacheManager.administration().removeCache(TEST_CACHE_NAME);
> remoteCacheManager.administration().createCache(TEST_CACHE_NAME, cacheManager.getDefaultCacheConfiguration());
> // Then
> final SpringCache secondObtainedSpringCache = objectUnderTest.getCache(TEST_CACHE_NAME);
> assertNotSame(
> "getCache() shouldn't have the same SpringCache instance for the same name because the config was changed",
> firstObtainedSpringCache, secondObtainedSpringCache);
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the infinispan-issues
mailing list