diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2020-03-23 19:09:29 +0000 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2020-03-23 19:09:29 +0000 |
commit | b0161df42e9a20c69c912f67176c226ae9172b21 (patch) | |
tree | 80938a9e5094a20d60cffc243aecb987a173ef05 | |
parent | bac93637edc22e1953ad3bf9361a8a0526b3cdae (diff) | |
download | unit-b0161df42e9a20c69c912f67176c226ae9172b21.tar.gz unit-b0161df42e9a20c69c912f67176c226ae9172b21.tar.bz2 |
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.
Diffstat (limited to '')
-rw-r--r-- | test/unit/main.py | 5 |
1 files changed, 4 insertions, 1 deletions
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 = [ |