summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2020-03-23 19:09:29 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2020-03-23 19:09:29 +0000
commitb0161df42e9a20c69c912f67176c226ae9172b21 (patch)
tree80938a9e5094a20d60cffc243aecb987a173ef05
parentbac93637edc22e1953ad3bf9361a8a0526b3cdae (diff)
downloadunit-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.py5
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 = [