From bbfdbe25a115de7b61db0c6e3802245dffc0e2d1 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Wed, 2 Sep 2020 21:36:06 +0200 Subject: Improve the stability of the ExternalProject download tests --- Tests/RunCMake/ExternalProject/DownloadServer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tests/RunCMake/ExternalProject/DownloadServer.py b/Tests/RunCMake/ExternalProject/DownloadServer.py index 3738317..63b7fa7 100644 --- a/Tests/RunCMake/ExternalProject/DownloadServer.py +++ b/Tests/RunCMake/ExternalProject/DownloadServer.py @@ -8,8 +8,11 @@ import threading args = None outerthread = None +barrier = threading.Barrier(2) + class SimpleHTTPRequestHandler(BaseHTTPRequestHandler): def do_GET(self): + barrier.wait() self.send_response(200) self.end_headers() data = b'D' @@ -46,4 +49,5 @@ if __name__ == "__main__": serverThread = threading.Thread(target=runServer,args=(args.file,)) serverThread.daemon = True serverThread.start() - serverThread.join(15) + barrier.wait(60) + serverThread.join(20) -- cgit v0.12