This is an automated email from the ASF dual-hosted git repository.

ptupitsyn pushed a commit to branch ignite-16771
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/ignite-16771 by this push:
     new e18223bbb wip testClientRetriesComputeJobOnPrimaryAndDefaultNodes
e18223bbb is described below

commit e18223bbbf403e100baac7b80cd99c4e25e95b6e
Author: Pavel Tupitsyn <ptupit...@apache.org>
AuthorDate: Thu Apr 14 19:56:41 2022 +0300

    wip testClientRetriesComputeJobOnPrimaryAndDefaultNodes
---
 .../java/org/apache/ignite/client/ClientComputeTest.java   | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git 
a/modules/client/src/test/java/org/apache/ignite/client/ClientComputeTest.java 
b/modules/client/src/test/java/org/apache/ignite/client/ClientComputeTest.java
index 79eb91af2..35c1d2746 100644
--- 
a/modules/client/src/test/java/org/apache/ignite/client/ClientComputeTest.java
+++ 
b/modules/client/src/test/java/org/apache/ignite/client/ClientComputeTest.java
@@ -77,8 +77,19 @@ public class ClientComputeTest {
     }
 
     @Test
-    public void testClientRetriesComputeJobOnPrimaryAndDefaultNodes() {
+    public void testClientRetriesComputeJobOnPrimaryAndDefaultNodes() throws 
Exception {
+        initServers(reqId -> reqId % 2 == 0);
 
+        try (var client = getClient(server3)) {
+            for (int i = 0; i < 100; i++) {
+                var nodeId = i % 3 + 1;
+                var nodeName = "s" + nodeId;
+
+                String res = 
client.compute().<String>execute(getClusterNodes(nodeName), "job").join();
+
+                assertEquals("s3", res);
+            }
+        }
     }
 
     private IgniteClient getClient(TestServer... servers) {
@@ -87,6 +98,7 @@ public class ClientComputeTest {
         return IgniteClient.builder()
                 .addresses(addresses)
                 .reconnectThrottlingPeriod(0)
+                .retryPolicy(new RetryLimitPolicy().retryLimit(3))
                 .build();
     }
 

Reply via email to