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 e599742 commit 93387e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:

- name: Build java client
working-directory: java
run: ./gradlew --continue build -x javadoc
run: ./gradlew :integTest:test --tests '*.fcall_readonly_function'

- name: Ensure no skipped files by linter
working-directory: java
Expand Down
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 @@ -100,6 +100,7 @@
import lombok.SneakyThrows;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.RepeatedTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.params.ParameterizedTest;
Expand Down Expand Up @@ -1646,12 +1647,13 @@ public void fcall_binary_with_keys(String prefix) {
}

@SneakyThrows
@Test
// @Test
@RepeatedTest(1000)
public void fcall_readonly_function() {
assumeTrue(SERVER_VERSION.isGreaterThanOrEqualTo("7.0.0"), "This feature added in version 7");
assumeTrue(
!SERVER_VERSION.isGreaterThanOrEqualTo("8.0.0"),
"Temporary disabeling this test on valkey 8");
// assumeTrue(
// !SERVER_VERSION.isGreaterThanOrEqualTo("8.0.0"),
// "Temporary disabeling this test on valkey 8");

String libName = "fcall_readonly_function";
// intentionally using a REPLICA route
Expand All @@ -1663,6 +1665,7 @@ public void fcall_readonly_function() {
String code = generateLuaLibCode(libName, Map.of(funcName, "return 42"), false);

assertEquals(libName, clusterClient.functionLoad(code, false).get());
Thread.sleep(1000);

// fcall on a replica node should fail, because a function isn't guaranteed to be RO
var executionException =
Expand Down

0 comments on commit 93387e1

Please sign in to comment.