laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35940?usp=email )
Change subject: vty_test_runner: Don't wait for more than 10s when connecting to sockets ......................................................................
vty_test_runner: Don't wait for more than 10s when connecting to sockets
Change-Id: Iadb437ce0bafb28baa978d287dbb1006ec97f236 --- M tests/vty/vty_test_runner.py 1 file changed, 13 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/40/35940/1
diff --git a/tests/vty/vty_test_runner.py b/tests/vty/vty_test_runner.py index fce3654..ba1d90b 100755 --- a/tests/vty/vty_test_runner.py +++ b/tests/vty/vty_test_runner.py @@ -30,6 +30,8 @@ # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..')
+TIMEOUT = 10 + class TestVTYBase(unittest.TestCase):
def checkForEndAndExit(self): @@ -127,6 +129,7 @@ # IPv4: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, proto) s.bind(('127.0.0.3', 0)) + s.settimeout(TIMEOUT) try: s.connect(('127.0.0.2',2905)) except socket.error as msg: @@ -137,6 +140,7 @@ # IPv6: s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM, proto) s.bind(('::1', 0)) + s.settimeout(TIMEOUT) try: s.connect(('::1',2905)) except socket.error as msg: