]> granicus.if.org Git - php/commit
Refactored and speeded up php_cli_server tests, also get rid of test hanging on ubuntu:
authorShein Alexey <shein@php.net>
Tue, 20 Sep 2011 14:53:46 +0000 (14:53 +0000)
committerShein Alexey <shein@php.net>
Tue, 20 Sep 2011 14:53:46 +0000 (14:53 +0000)
commit2cf4f98c935eabae35450413718b70e29e5d804a
treeb15912a7d02de6108cb06113d116abf499672181
parent0d74e0f091463fcb42fc1aab444fc92b58eea7c9
Refactored and speeded up php_cli_server tests, also get rid of test hanging on ubuntu:
1) Prepended starting the server with "exec" so proc_terminate can correctly close it (see also this note http://www.php.net/manual/en/function.proc-get-status.php#93382 for details)
2) Moved putting down the server to the shutdown function to make it independent from tests (fatal) errors
3) Moved php cli executable into the function to make tests more readable
4) changed sleep(1) to usleep(50000) (50 ms) to make tests faster - this needs more testing and if timeout is too small should be increased
sapi/cli/tests/php_cli_server.inc
sapi/cli/tests/php_cli_server_001.phpt
sapi/cli/tests/php_cli_server_002.phpt
sapi/cli/tests/php_cli_server_003.phpt