Skip to content

Commit

Permalink
Polishing #1340
Browse files Browse the repository at this point in the history
scriptKill on the reactive Cluster API now correctly calls scriptKill instead of scriptFlush. Fix test.

Original pull request: #1341
  • Loading branch information
mp911de committed Jul 13, 2020
1 parent 32e17ba commit 4ea43dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ public Mono<String> scriptFlush() {

@Override
public Mono<String> scriptKill() {
Map<String, Publisher<String>> publishers = executeOnNodes(RedisScriptingReactiveCommands::scriptFlush, ALL_NODES);
Map<String, Publisher<String>> publishers = executeOnNodes(RedisScriptingReactiveCommands::scriptKill, ALL_NODES);
return Flux.merge(publishers.values()).onErrorReturn("OK").last();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
import io.lettuce.test.settings.TestSettings;

/**
* Integration tests for {@link StatefulRedisClusterConnection}.
*
* @author Mark Paluch
*/
@SuppressWarnings("rawtypes")
Expand Down Expand Up @@ -383,7 +385,7 @@ void scriptFlush() {

@Test
void scriptKill() {
assertThat(sync.scriptKill()).isEqualTo("OK");
assertThatThrownBy(sync::scriptKill).hasMessageContaining("NOTBUSY");
}

@Test
Expand Down

0 comments on commit 4ea43dc

Please sign in to comment.