8000 [Process] Make test AbstractProcessTest::testStartAfterATimeout useful again by ymc-dabe · Pull Request #13446 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Process] Make test AbstractProcessTest::testStartAfterATimeout useful again #13446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Do not execute invalid code in AbstractProcessTest::testStartAfterATi…
…meout()

Previously to this commit the command executed in the tests actually was:
  # php -r "$n = 1000; while ($n--) {echo ''; usleep(1000); }"

This does not (as intended) wait ~1s, but produces the following error:
  PHP Parse error: syntax error, unexpected '=' in Command line code on line 1
  • Loading branch information
ymc-dabe committed Jan 19, 2015
commit 675bc3418e10c2b3a129094e7fa8f9a5b5c89da7
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ public function testCheckTimeoutOnStartedProcess()

public function testStartAfterATimeout()
{
$process = $this->getProcess('php -r "$n = 1000; while ($n--) {echo \'\'; usleep(1000); }"');
$process = $this->getProcess(sprintf('php -r %s', escapeshellarg('$n = 1000; while ($n--) {echo \'\'; usleep(1000); }')));
$process->setTimeout(0.1);
try {
$process->run();
Expand Down
0