summaryrefslogtreecommitdiffhomepage
path: root/test/unit/main.py (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-04-24Tests: introduced module version specification in prerequisites.Andrei Zeliankou1-2/+14
2020-04-08Controller: improved handling of unix domain control socket.Valentin Bartenev1-4/+1
One of the ways to detect Unit's startup and subsequent readiness to accept commands relies on waiting for the control socket file to be created. Earlier, it was unreliable due to a race condition between the client's connect() and the daemon's listen() calls after the socket's bind() call. Now, unix domain listening sockets are created with a nxt_listen_socket_create() call as follows: s = socket(); unlink("path/to/socket.tmp") bind(s, "path/to/socket.tmp"); listen(s); rename("path/to/socket.tmp", "path/to/socket"); This eliminates a time-lapse when the socket file is already created but nobody is listening on it yet, which therefore prevents the condition described above. Also, it allows reliably detecting whether the socket is being used or simply wasn't cleaned after the daemon stopped abruptly. A successful connection to the socket file means the daemon has been started; otherwise, the file can be overwritten.
2020-04-03Tests: minor fixes.Andrei Zeliankou1-8/+18
2020-03-30Fixing application process infinite loop.Max Romanov1-1/+0
Main process exiting before app process init may have caused hanging.
2020-03-23Tests: wait for unit.pid file before running tests.Andrei Zeliankou1-1/+4
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.
2020-03-23Tests: rearranging functions in main.py.Andrei Zeliankou1-69/+69
2020-03-23Tests: terminate unitd process on exit().Andrei Zeliankou1-12/+14
2020-03-12Using disk file to store large request body.Max Romanov1-0/+1
This closes #386 on GitHub.
2020-03-12Tests: skip "last message send failed" alerts globally.Andrei Zeliankou1-0/+1
2020-03-10Tests: use blocking to print unit.log files.Andrei Zeliankou1-1/+1
2020-03-06Tests: unitd stderr output redirected to unit.log.Valentin Bartenev1-13/+13
A part of the debug log was printed to stderr before the log file was opened. Now, this output is redirected to the same log file.
2020-03-06Tests: simplified unitd process running.Valentin Bartenev1-42/+26
There are no reasons to wrap the Unit daemon in a separate Python process.
2020-02-27Tests: added "-r" option to print unit.log on failures.Andrei Zeliankou1-5/+24
2020-02-04Tests: fixing Python 3.8.1 errors on Mac.Max Romanov1-9/+4
- "Can't pickle local object ..." - "if __name__ == '__main__':" pattern required for multiprocessing
2019-11-09Tests: fixed tests to run as root.Tiago Natel1-1/+20
- The mode of testdir was changed to allow reading from other users/groups. - The java multipart test now uploads the file into an app writable dir. - The build directory was made readable for other users. - The python environment test now uses the HOME env var instead of PWD because the latter is not set by the root shell (/bin/sh) by default. - The node `node_modules` directory now is copied into the `testdir` instead of using symlinks.
2019-11-14Tests: run_process() and stop_processes() introduced.Andrei Zeliankou1-0/+22
2019-10-08Tests: increased subprocess timeout on Unit exit.Andrey Zelenkov1-13/+13
Also changed order of subprocess status checks. _terminate_process() method removed.
2019-09-16Tests: fixed features check.Andrey Zelenkov1-2/+2
2019-09-14Tests: refactored prerequisites model.Andrey Zelenkov1-93/+80
2019-09-16Tests: more comments.Andrey Zelenkov1-0/+4
2019-09-16Tests: set default "unsafe" value.Andrey Zelenkov1-0/+1
2019-08-22Tests: Node.js websockets.Andrey Zelenkov1-0/+1
2019-08-22Tests: "--unsafe" option introduced.Andrey Zelenkov1-0/+8
2019-08-08Tests: fixed modules version parsing.Andrey Zelenkov1-1/+1
2019-08-06Tests: rerun tests for each module version.Andrey Zelenkov1-1/+25
Rerun supported for Python, PHP, Perl, Ruby, and Java modules.
2019-04-22Tests: using blocking for large output.Andrey Zelenkov1-0/+4
2019-04-15Tests: wait more time on Unit closing.Andrey Zelenkov1-1/+1
2019-04-09Tests: check unitd availability before start.Andrey Zelenkov1-2/+7
2019-04-09Tests: simplified module checking.Andrey Zelenkov1-0/+4
2019-03-28Tests: unit module refactoring.Andrey Zelenkov1-0/+311