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

brandonwilliams pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 47f33636 ninja: increase Jolokia retries without sleeping
47f33636 is described below

commit 47f336365c1386180a78cd869fbf5fa63e750f42
Author: Brandon Williams <[email protected]>
AuthorDate: Thu Sep 8 13:06:59 2022 -0500

    ninja: increase Jolokia retries without sleeping
---
 tools/jmxutils.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/jmxutils.py b/tools/jmxutils.py
index d3fb9804..137f0159 100644
--- a/tools/jmxutils.py
+++ b/tools/jmxutils.py
@@ -2,7 +2,6 @@ import json
 import os
 import subprocess
 import socket
-import time
 import urllib.request
 import urllib.parse
 import logging
@@ -181,7 +180,7 @@ class JolokiaAgent(object):
     def get_port(self, default=8778):
         available = None
         port = default
-        for _ in range(5):
+        for _ in range(50):
             s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
             try:
                 s.bind((self.node.network_interfaces['binary'][0], port))
@@ -193,7 +192,6 @@ class JolokiaAgent(object):
             s.close()
             if available:
                 break
-            time.sleep(2)
         self.port = available
         return available
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to