zenovich / runkit

Runkit (official PECL PHP Runkit extension)
http://pecl.php.net/runkit
Other
610 stars 136 forks source link

fix test with system php-fpm #93

Closed remicollet closed 8 years ago

remicollet commented 8 years ago

When using system php-fpm, test can fails, this should fix this:

zenovich commented 8 years ago

I think the logs should remain in output. What's the reason for removing them?

remicollet commented 8 years ago

Because of additional notices in some build (systemd), and the test is about runkit, not about fpm ;)

$ cat tests/runkit_fpm_internal_function_restore.diff
021+ [19-Oct-2015 09:50:22] NOTICE: systemd monitor interval set to 10000ms
zenovich commented 8 years ago

This doesn't work on my computer, and without logs I can't find out why.

  1
  2 ---- EXPECTED OUTPUT
  3 Test Start
  4 A B
  5 C D
  6 Test End
  7 
  8 Request ok
  9 Test Start
 10 A B
 11 C D
 12 Test End
 13 
 14 Request ok
 15 Test Start
 16 A B
 17 C D
 18 Test End
 19 
 20 Request ok
 21 Done
 22 ---- ACTUAL OUTPUT
 23 Warning: fsockopen(): unable to connect to 127.0.0.1:9004 (Connection refused) in /home/dzenovich/runkit-my/tests/_fcgi.inc on line 226
 24 Request error
 25 
 26 Warning: fsockopen(): unable to connect to 127.0.0.1:9004 (Connection refused) in /home/dzenovich/runkit-my/tests/_fcgi.inc on line 226
 27 Request error
 28 
 29 Warning: fsockopen(): unable to connect to 127.0.0.1:9004 (Connection refused) in /home/dzenovich/runkit-my/tests/_fcgi.inc on line 226
 30 Request error
 31 Done
 32 ---- FAILED
remicollet commented 8 years ago

Sorry... I think this is related to missing space in fopen command.

I also revert log_level, but only check for the "ready to handle connections" and ignore remaining output.

I can squash the commits if you prefer a single clean one.

remicollet commented 8 years ago

Tahnks