libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit b50d1893a9622583361b5ea843f105fe7fc058e5
parent af043ff81663ae2e1029a3fde56e031f13a8adb4
Author: Florian Dold <florian.dold@gmail.com>
Date:   Sat, 20 Jun 2020 12:09:28 +0530

check for port with SO_REUSEADDR

Diffstat:
Mintegration-tests/util.py | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/integration-tests/util.py b/integration-tests/util.py @@ -6,15 +6,18 @@ from requests import post, get from time import sleep import atexit from pathlib import Path +import sys def checkPort(port): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) try: s.bind(("0.0.0.0", port)) s.close() except: print(f"Port {port} is not available") + print(sys.exc_info()[0]) exit(77) def kill(name, s):