Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury-Fridlyand committed Oct 3, 2024
1 parent a83de34 commit 35fc6a3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 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 @@ -1645,7 +1646,8 @@ 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");

Expand All @@ -1660,7 +1662,14 @@ public void fcall_readonly_function() {

assertEquals(libName, clusterClient.functionLoad(code, false).get());
// let replica sync with the primary node
assertEquals(1L, clusterClient.wait(1L, 1000L).get());
// assertEquals(1L, clusterClient.wait(1L, 1000L).get());
if (clusterClient.wait(1L, 1000L).get() != 1L) {
var info =
clusterClient.info(new Section[] {REPLICATION}, ALL_PRIMARIES).get().getMultiValue();
for (var data : info.values()) {
System.err.println(data);
}
}

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

0 comments on commit 35fc6a3

Please sign in to comment.