-
Notifications
You must be signed in to change notification settings - Fork 257
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
CTRL-C handling in Behat inside docker #299
Comments
Aaaaah, the problem was that the moodle php image does not have PCNTL installed, this change adds support for it in root/tmp/setup/php-extensions.sh in moodle-php-apache image:
but it is not all that is necessary there to fix the problem completely Actually sometimes the ctrl-c works fine and the selenium session gets closed during shutdown, but in most cases it says "^CSegmentation fault" and the selenium session is left to time out, so I guess it would be sae to add higher limit anyway. |
I think I found it, it seems that the shutdown manager is interfering with CTRL-C handling in vendor/behat/behat/src/Behat/Testwork/EventDispatcher/Cli/SigintController.php this fixes it for me when using vendor/bin/behat:
|
Quite often I realise I need to do some changes in feature fields before behat execution in docker completes, so I press CTRL-C to stop it. But the CTRL-C does not work the same in PHP inside docker and so the selenium session does not get terminated properly and because there is a default maximum session limit of 1 in standalone chrome selenium then the next behat gets stuck for 300 seconds until the selenium session times out (or until you restart selenium).
Workaround is to increase the maximum number of sessions like this
skodak@c180ab2
I wanted to ask you guys, is there is a better way to deal with CTRL-C so that standard PHP signal handling works as usual?
The text was updated successfully, but these errors were encountered: