We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c93f18e commit 9c68a97Copy full SHA for 9c68a97
avocado/core/nrunner/task.py
@@ -2,6 +2,7 @@
2
import json
3
import socket
4
import tempfile
5
+import time
6
from uuid import uuid1
7
8
from avocado.core.nrunner.runnable import (
@@ -41,7 +42,16 @@ def post(self, status):
41
42
host, port = self.uri.split(':')
43
port = int(port)
44
if self.connection is None:
- self.connection = socket.create_connection((host, port))
45
+ for _ in range(30):
46
+ try:
47
+ self.connection = socket.create_connection((host, port))
48
+ break
49
+ except ConnectionRefusedError as error:
50
+ # TODO: should we at least provide some logging here?
51
+ #logging.error(error)
52
+ time.sleep(1)
53
+ else:
54
+ raise error
55
else:
56
57
self.connection = socket.socket(socket.AF_UNIX,
0 commit comments