Skip to content

Commit

Permalink
Fixes matching for a lowercase subcommand
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Kubovic <[email protected]>
  • Loading branch information
MichaelKubovic committed Nov 24, 2023
1 parent e0210be commit c7c66d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public Future<Response> send(Request request) {
// can run anywhere
if (REDUCERS.containsKey(cmd)) {
sendToAllSlots(promise, req, cmd, args, forceMasterEndpoint, REDUCERS.get(cmd));
} else if(cmd.equals(SCRIPT) && Arrays.equals(args.get(0), "LOAD".getBytes())) {
} else if(cmd.equals(SCRIPT) && "LOAD".equalsIgnoreCase(new String(args.get(0)))) {
sendToAllSlots(promise, req, cmd, args, forceMasterEndpoint, responses -> {
// all nodes should compute the same sha
assert responses.stream().map(Response::toString).collect(Collectors.toSet()).size() == 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ public void testScriptLoadRunsOnEveryMaster(TestContext should) {
cluster.exceptionHandler(should::fail);
Future<@Nullable Response> setFuture1 = cluster.send(cmd(SET).arg(key1).arg(argv1));
Future<@Nullable Response> setFuture2 = cluster.send(cmd(SET).arg(key2).arg(argv2));
Future<@Nullable Response> scriptLoadFuture = cluster.send(cmd(SCRIPT).arg("LOAD").arg(script));
Future<@Nullable Response> scriptLoadFuture = cluster.send(cmd(SCRIPT).arg("load").arg(script));

return Future.all(setFuture1, setFuture2, scriptLoadFuture)
.compose(compositeRet -> {
Expand Down

0 comments on commit c7c66d7

Please sign in to comment.