{"action":"created","issue":{"url":"https://api.github.com/repos/Codeception/Codeception/issues/3720","repository_url":"https://api.github.com/repos/Codeception/Codeception","labels_url":"https://api.github.com/repos/Codeception/Codeception/issues/3720/labels{/name}","comments_url":"https://api.github.com/repos/Codeception/Codeception/issues/3720/comments","events_url":"https://api.github.com/repos/Codeception/Codeception/issues/3720/events","html_url":"https://github.com/Codeception/Codeception/issues/3720","id":188547268,"number":3720,"title":"Code Coverage = Maximum execution time of 30 seconds exceeded","user":{"login":"sharky98","id":8150191,"avatar_url":"https://avatars.githubusercontent.com/u/8150191?v=3","gravatar_id":"","url":"https://api.github.com/users/sharky98","html_url":"https://github.com/sharky98","followers_url":"https://api.github.com/users/sharky98/followers","following_url":"https://api.github.com/users/sharky98/following{/other_user}","gists_url":"https://api.github.com/users/sharky98/gists{/gist_id}","starred_url":"https://api.github.com/users/sharky98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharky98/subscriptions","organizations_url":"https://api.github.com/users/sharky98/orgs","repos_url":"https://api.github.com/users/sharky98/repos","events_url":"https://api.github.com/users/sharky98/events{/privacy}","received_events_url":"https://api.github.com/users/sharky98/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-10T16:02:31Z","updated_at":"2016-11-11T12:47:32Z","closed_at":null,"body":"Hello,\r\n\r\nI'm trying to run some test on my Symfony2 software (which is private, so I can't share my sources). I have 123 tests with 360 assertions that all succeed without any issues on my local machine and on my Gitlab CI Runner.\r\n\r\nHowever, as soon as I activate the code coverage, it doesn't work anymore, I've got maximum execution time of 30 seconds exceeded errors! Weirdest thing, without any updates (that I'm aware of...), 1 or 2 weeks ago, all was working fine...\r\n\r\nOn my Gitlab CI, all the tests runs succesfully and as soon as the last test is completed (like, less than 1 second after than...), the test fail with the error `Fatal error: Maximum execution time of 30 seconds exceeded in /[basePath]/vendor/phpunit/php-token-stream/src/Token/Stream.php on line 363`. The line varies from one run to another.\r\n\r\nOn my local machine, it consistently crash at the same test, but with various stack (most of the time it's the ORM, but in different files each time).\r\n\r\nI'm kind of lost in regards to what to do next to debug this to make it work. Could you please help me figure it out?\r\n\r\n### Details\r\n\r\n* Codeception version: 2.2.5\r\n* PHP Unit Version: 5.6.1\r\n* PHP Version: 5.6\r\n* Operating System: Windows & Linux\r\n* Installation type: phar executable with composer vendors\r\n* List of installed packages\r\n```\r\nbehat/gherkin                            v4.4.4\r\nbehat/transliterator                     v1.1.0\r\nbrunops/select24entity-bundle            dev-master 7a7be7f\r\ncocur/slugify                            v2.3\r\ncodeception/c3                           2.0.8\r\ncodeception/codeception                  2.2.5\r\ndoctrine/annotations                     v1.2.7\r\ndoctrine/cache                           v1.6.0\r\ndoctrine/collections                     v1.3.0\r\ndoctrine/common                          v2.6.1\r\ndoctrine/dbal                            v2.5.5\r\ndoctrine/doctrine-bundle                 1.6.4\r\ndoctrine/doctrine-cache-bundle           1.3.0\r\ndoctrine/doctrine-migrations-bundle      v1.2.0\r\ndoctrine/inflector                       v1.1.0\r\ndoctrine/instantiator                    1.0.5\r\ndoctrine/lexer                           v1.0.1\r\ndoctrine/migrations                      1.4.1\r\ndoctrine/orm                             v2.5.5\r\nfacebook/webdriver                       1.2.0\r\nfriendsofsymfony/user-bundle             1.3.x-dev 113cc4e\r\ngedmo/doctrine-extensions                v2.4.24\r\nguzzlehttp/guzzle                        6.2.2\r\nguzzlehttp/promises                      1.2.0\r\nguzzlehttp/psr7                          1.3.1\r\nincenteev/composer-parameter-handler     v2.1.2\r\nircmaxell/password-compat                v1.0.4\r\njdorn/sql-formatter                      v1.2.17\r\njms/metadata                             1.5.1\r\njms/parser-lib                           1.0.0\r\njms/serializer                           1.3.1\r\njms/serializer-bundle                    1.1.0\r\nknplabs/knp-components                   1.3.3\r\nknplabs/knp-menu                         2.2.0\r\nknplabs/knp-menu-bundle                  2.1.3\r\nknplabs/knp-paginator-bundle             2.5.3\r\nmonolog/monolog                          1.21.0\r\nmyclabs/deep-copy                        1.5.4\r\nnpm-asset/almond                         0.3.3\r\nnpm-asset/bootstrap                      3.3.7\r\nnpm-asset/bootswatch                     3.3.7\r\nnpm-asset/jquery                         1.12.4\r\nnpm-asset/jquery-mousewheel              3.1.13\r\nnpm-asset/jstree                         3.3.2\r\nnpm-asset/select2                        4.0.3\r\nocramius/proxy-manager                   1.0.2\r\nparagonie/random_compat                  v2.0.3\r\nphpcollection/phpcollection              0.5.0\r\nphpdocumentor/reflection-common          1.0\r\nphpdocumentor/reflection-docblock        3.1.1\r\nphpdocumentor/type-resolver              0.2\r\nphpoption/phpoption                      1.5.0\r\nphpspec/prophecy                         v1.6.1\r\nphpunit/php-code-coverage                4.0.1\r\nphpunit/php-file-iterator                1.4.1\r\nphpunit/php-text-template                1.2.1\r\nphpunit/php-timer                        1.0.8\r\nphpunit/php-token-stream                 1.4.8\r\nphpunit/phpunit                          5.6.1\r\nphpunit/phpunit-mock-objects             3.4.0\r\npsr/http-message                         1.0.1\r\npsr/log                                  1.0.2\r\nsebastian/code-unit-reverse-lookup       1.0.0\r\nsebastian/comparator                     1.2.0\r\nsebastian/diff                           1.4.1\r\nsebastian/environment                    1.3.8\r\nsebastian/exporter                       1.2.2\r\nsebastian/global-state                   1.1.1\r\nsebastian/object-enumerator              1.0.0\r\nsebastian/recursion-context              1.0.2\r\nsebastian/resource-operations            1.0.0\r\nsebastian/version                        2.0.0\r\nsensio/distribution-bundle               v5.0.13\r\nsensio/framework-extra-bundle            v3.0.16\r\nsensio/generator-bundle                  v3.0.11\r\nsensiolabs/security-checker              v4.0.0\r\nsonata-project/admin-bundle              3.9.0\r\nsonata-project/block-bundle              3.2.0\r\nsonata-project/cache                     1.0.7\r\nsonata-project/core-bundle               3.1.1\r\nsonata-project/datagrid-bundle           2.x-dev 6ed29d6\r\nsonata-project/doctrine-extensions       1.0.2\r\nsonata-project/doctrine-orm-admin-bundle 3.1.1\r\nsonata-project/easy-extends-bundle       2.1.10\r\nsonata-project/exporter                  1.7.0\r\nsonata-project/google-authenticator      1.0.2\r\nsonata-project/user-bundle               3.1.0\r\nstof/doctrine-extensions-bundle          v1.2.2\r\nswiftmailer/swiftmailer                  v5.4.3\r\nsymfony/monolog-bundle                   2.11.1\r\nsymfony/phpunit-bridge                   v2.8.12\r\nsymfony/polyfill-apcu                    v1.2.0\r\nsymfony/polyfill-intl-icu                v1.2.0\r\nsymfony/polyfill-mbstring                v1.2.0\r\nsymfony/polyfill-php54                   v1.2.0\r\nsymfony/polyfill-php55                   v1.2.0\r\nsymfony/polyfill-php56                   v1.2.0\r\nsymfony/polyfill-php70                   v1.2.0\r\nsymfony/polyfill-util                    v1.2.0\r\nsymfony/security-acl                     v3.0.0\r\nsymfony/swiftmailer-bundle               v2.3.11\r\nsymfony/symfony                          v2.8.12\r\ntwig/extensions                          v1.4.0\r\ntwig/twig                                v1.26.1\r\nwebmozart/assert                         1.1.0\r\nzendframework/zend-code                  2.6.3\r\nzendframework/zend-eventmanager          3.0.1\r\n```\r\n* Suite configuration:\r\n\r\ncodeception.yml\r\n```yml\r\nactor: Tester\r\npaths:\r\n    tests: tests\r\n    log: tests/_output\r\n    data: tests/_data\r\n    support: tests/_support\r\n    envs: tests/_envs\r\nsettings:\r\n    bootstrap: _bootstrap.php\r\n    colors: true\r\n    memory_limit: 1024M\r\nextensions:\r\n    enabled:\r\n        - Codeception\\Extension\\RunFailed\r\ncoverage:\r\n    enabled: true\r\n    include:\r\n        - src/*.php\r\n    remote_context_options:\r\n        http:\r\n            timeout: 90\r\nmodules:\r\n    config:\r\n        Db:\r\n            dsn: 'mysql:host=mariadb;dbname=test_db'\r\n            user: 'root'\r\n            password: 'test_db'\r\n            dump: tests/_data/dump.sql\r\n            cleanup: true\r\n            populate: true\r\n        Symfony:\r\n            app_path: 'app'\r\n            environment: 'test'\r\n        Doctrine2:\r\n            depends: Symfony\r\n```\r\nunit.suite.yml\r\n```yml\r\nclass_name: UnitTester\r\nmodules:\r\n    enabled:\r\n        - Asserts\r\n        - \\Helper\\Unit\r\n```\r\n\r\nacceptance.suite.yml\r\n```yml\r\nclass_name: AcceptanceTester\r\nmodules:\r\n    enabled: [Db, Symfony, Doctrine2, PhpBrowser, \\Helper\\Acceptance]\r\n    config:\r\n        PhpBrowser:\r\n            url: http://localhost:8000/app_test.php\r\n            curl:\r\n              CURLOPT_TIMEOUT_MS: 60000\r\n```\r\n\r\ncontainer.suite.yml (this is my functionnal test, but it use the Symfony Container)\r\n```yml\r\nclass_name: ContainerTester\r\nmodules:\r\n    enabled: [Db, Symfony, Doctrine2, Asserts, \\Helper\\Unit]\r\n```\r\n\r\n.gitlab-ci.yml\r\n```yml\r\nvariables:\r\n  # Configure mysql environment variables\r\n  MYSQL_DATABASE: test_db\r\n  MYSQL_ROOT_PASSWORD: test_db\r\n\r\nbefore_script:\r\n  ## Docker Configuration\r\n  # Get program needed for the test\r\n  - apt-get update -yqq\r\n  - apt-get install git zip unzip wget mariadb-client -yqq\r\n  # Copy custom php.ini\r\n  - cp tests/parameters.yml ./app/config/parameters.yml\r\n  - cp tests/test_php.ini /usr/local/etc/php/conf.d/test.ini\r\n  # Install PHP extension MySQL\r\n  - docker-php-ext-install pdo_mysql\r\n  # Install PHP pcntl\r\n  - docker-php-ext-install pcntl\r\n  # Install xDebug\r\n  - pecl install xdebug\r\n  - docker-php-ext-enable xdebug\r\n\r\n  ## Software Installation\r\n  - cd /[buildPath]\r\n  # Install composer dependencies\r\n  - curl -sS https://getcomposer.org/installer | php\r\n  - php composer.phar install --prefer-dist --no-progress\r\n  # Install codeception\r\n  - wget -q http://codeception.com/releases/2.2.5/codecept.phar\r\n  # Build Suites\r\n  - php codecept.phar build\r\n  # Clear and Warmup Cache\r\n  - php app/console cache:clear --env=prod\r\n  - php app/console cache:clear --env=dev\r\n  - php app/console cache:clear --env=test\r\n  - php app/console cache:warmup --env=prod\r\n  - php app/console cache:warmup --env=dev\r\n  - php app/console cache:warmup --env=test\r\n\r\nsoftware:TestCoverage:\r\n  image: php:5.6\r\n  services:\r\n    - mariadb:10.1\r\n  script:\r\n    - php app/console server:start\r\n    - php codecept.phar run --coverage --no-colors\r\n    \r\nsoftware:Test:\r\n  image: php:5.6\r\n  services:\r\n    - mariadb:10.1\r\n  script:\r\n    - php app/console server:start\r\n    - php codecept.phar run --no-colors\r\n```"},"comment":{"url":"https://api.github.com/repos/Codeception/Codeception/issues/comments/259950327","html_url":"https://github.com/Codeception/Codeception/issues/3720#issuecomment-259950327","issue_url":"https://api.github.com/repos/Codeception/Codeception/issues/3720","id":259950327,"user":{"login":"sharky98","id":8150191,"avatar_url":"https://avatars.githubusercontent.com/u/8150191?v=3","gravatar_id":"","url":"https://api.github.com/users/sharky98","html_url":"https://github.com/sharky98","followers_url":"https://api.github.com/users/sharky98/followers","following_url":"https://api.github.com/users/sharky98/following{/other_user}","gists_url":"https://api.github.com/users/sharky98/gists{/gist_id}","starred_url":"https://api.github.com/users/sharky98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharky98/subscriptions","organizations_url":"https://api.github.com/users/sharky98/orgs","repos_url":"https://api.github.com/users/sharky98/repos","events_url":"https://api.github.com/users/sharky98/events{/privacy}","received_events_url":"https://api.github.com/users/sharky98/received_events","type":"User","site_admin":false},"created_at":"2016-11-11T12:47:32Z","updated_at":"2016-11-11T12:47:32Z","body":"Oh yeah... Forgot to mention in the despair I was that, I have a php.ini that set `max_execution_time = 300`. Without mentionning that the php.ini mention `Note: This directive is hardcoded to 0 for the CLI SAPI` for this `max_execution_time` directive... Using the PHAR, I'm a bit lost on where Codecept is able to modify a \"hardcoded\" directive..."}}
{"actor":{"display_login":"sharky98"}}