From a273e29fe220fbaad5084b763ee38788df7dbc74 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 13 Jul 2020 12:34:50 +0200 Subject: [PATCH] Polishing #1340 scriptKill on the reactive Cluster API now correctly calls scriptKill instead of scriptFlush. Fix test. Original pull request: #1341 --- .../cluster/RedisAdvancedClusterReactiveCommandsImpl.java | 2 +- .../core/cluster/AdvancedClusterClientIntegrationTests.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterReactiveCommandsImpl.java b/src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterReactiveCommandsImpl.java index ee7b9549de..6bca5cc83e 100644 --- a/src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterReactiveCommandsImpl.java +++ b/src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterReactiveCommandsImpl.java @@ -364,7 +364,7 @@ public Mono scriptFlush() { @Override public Mono scriptKill() { - Map> publishers = executeOnNodes(RedisScriptingReactiveCommands::scriptFlush, ALL_NODES); + Map> publishers = executeOnNodes(RedisScriptingReactiveCommands::scriptKill, ALL_NODES); return Flux.merge(publishers.values()).onErrorReturn("OK").last(); } diff --git a/src/test/java/io/lettuce/core/cluster/AdvancedClusterClientIntegrationTests.java b/src/test/java/io/lettuce/core/cluster/AdvancedClusterClientIntegrationTests.java index f19c86df38..6ff8633720 100644 --- a/src/test/java/io/lettuce/core/cluster/AdvancedClusterClientIntegrationTests.java +++ b/src/test/java/io/lettuce/core/cluster/AdvancedClusterClientIntegrationTests.java @@ -51,6 +51,8 @@ import io.lettuce.test.settings.TestSettings; /** + * Integration tests for {@link StatefulRedisClusterConnection}. + * * @author Mark Paluch */ @SuppressWarnings("rawtypes") @@ -381,7 +383,7 @@ void scriptFlush() { @Test void scriptKill() { - assertThat(sync.scriptKill()).isEqualTo("OK"); + assertThatThrownBy(sync::scriptKill).hasMessageContaining("NOTBUSY"); } @Test