diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index 5106aec4ce..2b82821a39 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -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 diff --git a/java/integTest/src/test/java/glide/cluster/CommandTests.java b/java/integTest/src/test/java/glide/cluster/CommandTests.java index cadd37a707..81cb7e594e 100644 --- a/java/integTest/src/test/java/glide/cluster/CommandTests.java +++ b/java/integTest/src/test/java/glide/cluster/CommandTests.java @@ -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; @@ -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 @@ -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 =