From b0161df42e9a20c69c912f67176c226ae9172b21 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Mon, 23 Mar 2020 19:09:29 +0000 Subject: [PATCH] Tests: wait for unit.pid file before running tests. Waiting for control.unit.sock was replaced by unit.pid due to current problem with race between connect() and listen() calls for control.unit.sock. This change should be reverted after fix. --- test/unit/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/unit/main.py b/test/unit/main.py index cdab486f..3d95a5b1 100644 --- a/test/unit/main.py +++ b/test/unit/main.py @@ -185,7 +185,10 @@ class TestUnit(unittest.TestCase): atexit.register(self.stop) - if not self.waitforfiles(self.testdir + '/control.unit.sock'): + # Due to race between connect() and listen() after the socket binding + # tests waits for unit.pid file which is created after listen(). + + if not self.waitforfiles(self.testdir + '/unit.pid'): exit("Could not start unit") self.skip_alerts = [