DATAREDIS-1049 - Fix retrieval of empty keyspaceNotificationsConfigParameter used to keep server defaults.
Empty Strings changed to be considered null throwing an exception on getRequiredAttribute so we now set the value explicitly for this attribute when considered empty. Original pull request: #491.
This commit is contained in:
committed by
Mark Paluch
parent
2afb579a94
commit
3dfe7af60e
@@ -114,6 +114,15 @@ public class RedisRepositoryConfigurationExtensionUnitTests {
|
||||
assertThat(getKeyspaceNotificationsConfigParameter(beanDefintionRegistry)).isEqualTo((Object) "KEA");
|
||||
}
|
||||
|
||||
@Test // DATAREDIS-1049
|
||||
public void explicitlyEmptyKeyspaceNotificationsConfigParameterShouldBeCapturedCorrectly() {
|
||||
|
||||
metadata = new StandardAnnotationMetadata(ConfigWithEmptyConfigParameter.class, true);
|
||||
BeanDefinitionRegistry beanDefintionRegistry = getBeanDefinitionRegistry();
|
||||
|
||||
assertThat(getKeyspaceNotificationsConfigParameter(beanDefintionRegistry)).isEqualTo("");
|
||||
}
|
||||
|
||||
private static void assertDoesNotHaveRepo(Class<?> repositoryInterface,
|
||||
Collection<RepositoryConfiguration<RepositoryConfigurationSource>> configs) {
|
||||
|
||||
@@ -179,6 +188,12 @@ public class RedisRepositoryConfigurationExtensionUnitTests {
|
||||
|
||||
}
|
||||
|
||||
@EnableRedisRepositories(considerNestedRepositories = true, enableKeyspaceEvents = EnableKeyspaceEvents.ON_STARTUP,
|
||||
keyspaceNotificationsConfigParameter = "")
|
||||
static class ConfigWithEmptyConfigParameter {
|
||||
|
||||
}
|
||||
|
||||
@RedisHash
|
||||
static class Sample {
|
||||
@Id String id;
|
||||
|
||||
Reference in New Issue
Block a user