Skip to content

Commit

Permalink
Signed-off-by: Yury-Fridlyand <[email protected]>
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury-Fridlyand committed Sep 24, 2024
1 parent 30e3661 commit 7c02646
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions java/integTest/src/test/java/glide/cluster/CommandTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -1607,8 +1607,8 @@ public void fcall_binary_with_keys(String prefix) {
GlideString binaryString =
gs(new byte[] {(byte) 0xFE, (byte) 0xEE, (byte) 0xEF, (byte) 252, (byte) 0});
SingleNodeRoute route = new SlotKeyRoute(key, PRIMARY);
String libName = "mylib_with_keys";
GlideString funcName = gs("myfunc_with_keys");
String libName = "mylib_with_keys-" + prefix;
GlideString funcName = gs("myfunc_with_keys-" + prefix);
// function $funcName returns array with first two arguments
String code =
generateLuaLibCode(libName, Map.of(funcName.toString(), "return {args[1]}"), true);
Expand All @@ -1634,9 +1634,12 @@ public void fcall_binary_with_keys(String prefix) {
.fcallReadOnly(funcName, new GlideString[] {gs(key)}, new GlideString[] {binaryString});

// check response from a routed transaction request
assertDeepEquals(new Object[][] {{binaryString}}, clusterClient.exec(transaction, route).get());
assertDeepEquals(
new Object[][] {{binaryString}, {binaryString}},
clusterClient.exec(transaction, route).get());
// if no route given, GLIDE should detect it automatically
assertDeepEquals(new Object[][] {{binaryString}}, clusterClient.exec(transaction).get());
assertDeepEquals(
new Object[][] {{binaryString}, {binaryString}}, clusterClient.exec(transaction).get());

assertEquals(OK, clusterClient.functionDelete(libName, route).get());
}
Expand Down

0 comments on commit 7c02646

Please sign in to comment.