Commit 7ed4273f authored by Brian Clozel's avatar Brian Clozel

Fix Redis Cache tests after key prefix changes

Update Redis Cache tests after changes in DATAREDIS-715.
parent 99466e7f
......@@ -283,8 +283,8 @@ public class CacheAutoConfigurationTests {
.withPropertyValues("spring.cache.type=redis",
"spring.cache.redis.time-to-live=15000",
"spring.cache.redis.cacheNullValues=false",
"spring.cache.redis.keyPrefix=foo",
"spring.cache.redis.useKeyPrefix=false")
"spring.cache.redis.keyPrefix=prefix",
"spring.cache.redis.useKeyPrefix=true")
.run((context) -> {
RedisCacheManager cacheManager = getCacheManager(context,
RedisCacheManager.class);
......@@ -295,8 +295,8 @@ public class CacheAutoConfigurationTests {
.isEqualTo(java.time.Duration.ofSeconds(15));
assertThat(redisCacheConfiguration.getAllowCacheNullValues())
.isFalse();
assertThat(redisCacheConfiguration.getKeyPrefix()).contains("foo");
assertThat(redisCacheConfiguration.usePrefix()).isFalse();
assertThat(redisCacheConfiguration.getKeyPrefixFor("keyName")).isEqualTo("prefix");
assertThat(redisCacheConfiguration.usePrefix()).isTrue();
});
}
......@@ -342,7 +342,7 @@ public class CacheAutoConfigurationTests {
.isEqualTo(java.time.Duration.ofMinutes(0));
assertThat(redisCacheConfiguration.getAllowCacheNullValues())
.isTrue();
assertThat(redisCacheConfiguration.getKeyPrefix()).isEmpty();
assertThat(redisCacheConfiguration.getKeyPrefixFor("test")).isEqualTo("test::");
assertThat(redisCacheConfiguration.usePrefix()).isTrue();
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment