Accept empty config values in the Lettuce connection wrapper.

Closes #2798
This commit is contained in:
Mark Paluch
2023-12-08 14:56:57 +01:00
parent a15d43f6b8
commit bcf761f0f7
5 changed files with 21 additions and 3 deletions

View File

@@ -215,6 +215,23 @@ public class LettuceReactiveServerCommandsIntegrationTests extends LettuceReacti
}
}
@ParameterizedRedisTest // GH-2798
void setConfigShouldRespondCorrectly() {
if (!(connection instanceof LettuceReactiveRedisClusterConnection)) {
connection.serverCommands().setConfig("notify-keyspace-events", "") //
.as(StepVerifier::create) //
.expectNext("OK")
.verifyComplete();
connection.serverCommands().setConfig("notify-keyspace-events", "KEA") //
.as(StepVerifier::create) //
.expectNext("OK")
.verifyComplete();
}
}
@ParameterizedRedisTest // DATAREDIS-659
void setConfigShouldApplyConfiguration() {

View File

@@ -91,6 +91,7 @@ public class RedisKeyValueAdapterTests {
RedisConnection connection = template.getConnectionFactory().getConnection();
try {
connection.setConfig("notify-keyspace-events", "");
connection.setConfig("notify-keyspace-events", "KEA");
} finally {
connection.close();