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

Running more that one test Throws Registry is already initialized Exception #2863

Closed
gilacost opened this Issue Mar 1, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@gilacost

gilacost commented Mar 1, 2016

captura de pantalla 2016-03-01 a las 18 23 42

@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Mar 1, 2016

Member

Please run Codeception with -vvv flag to get a stacktrace.
codecept run -vvv

Member

Naktibalda commented Mar 1, 2016

Please run Codeception with -vvv flag to get a stacktrace.
codecept run -vvv

@gilacost

This comment has been minimized.

Show comment
Hide comment
@gilacost

gilacost Mar 2, 2016

Exception trace:
() at /var/www/admin/current/vendor/zendframework/zendframework1/library/Zend/Registry.php:70
Zend_Registry::setInstance() at /var/www/admin/current/application/Bootstrap.php:9
Bootstrap->_initRegistry() at /var/www/admin/current/vendor/zendframework/zendframework1/library/Zend/Application/Bootstrap/BootstrapAbstract.php:681
Zend_Application_Bootstrap_BootstrapAbstract->_executeResource() at /var/www/admin/current/vendor/zendframework/zendframework1/library/Zend/Application/Bootstrap/BootstrapAbstract.php:634
Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap() at /var/www/admin/current/vendor/zendframework/zendframework1/library/Zend/Application/Bootstrap/BootstrapAbstract.php:598
Zend_Application_Bootstrap_BootstrapAbstract->bootstrap() at /var/www/admin/current/vendor/zendframework/zendframework1/library/Zend/Application.php:373
Zend_Application->bootstrap() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/Module/ZF1.php:132
Codeception\Module\ZF1->_before() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/Subscriber/Module.php:58
Codeception\Subscriber\Module->before() at n/a:n/a
call_user_func() at /var/www/admin/current/vendor/symfony/event-dispatcher/EventDispatcher.php:171
Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() at /var/www/admin/current/vendor/symfony/event-dispatcher/EventDispatcher.php:43
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/PHPUnit/Listener.php:121
Codeception\PHPUnit\Listener->fire() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/PHPUnit/Listener.php:92
Codeception\PHPUnit\Listener->startTest() at /var/www/admin/current/vendor/phpunit/phpunit/src/Framework/TestResult.php:327
PHPUnit_Framework_TestResult->startTest() at /var/www/admin/current/vendor/phpunit/phpunit/src/Framework/TestResult.php:552
PHPUnit_Framework_TestResult->run() at /var/www/admin/current/vendor/phpunit/phpunit/src/Framework/TestCase.php:724
PHPUnit_Framework_TestCase->run() at /var/www/admin/current/vendor/phpunit/phpunit/src/Framework/TestSuite.php:747
PHPUnit_Framework_TestSuite->run() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/PHPUnit/Runner.php:89
Codeception\PHPUnit\Runner->doEnhancedRun() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/SuiteManager.php:153
Codeception\SuiteManager->run() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/Codecept.php:203
Codeception\Codecept->runSuite() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/Codecept.php:172
Codeception\Codecept->run() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/Command/Run.php:262
Codeception\Command\Run->runSuites() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/Command/Run.php:189
Codeception\Command\Run->execute() at /var/www/admin/current/vendor/symfony/console/Command/Command.php:256
Symfony\Component\Console\Command\Command->run() at /var/www/admin/current/vendor/symfony/console/Application.php:791
Symfony\Component\Console\Application->doRunCommand() at /var/www/admin/current/vendor/symfony/console/Application.php:186
Symfony\Component\Console\Application->doRun() at /var/www/admin/current/vendor/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at /var/www/admin/current/vendor/codeception/codeception/codecept:28

gilacost commented Mar 2, 2016

Exception trace:
() at /var/www/admin/current/vendor/zendframework/zendframework1/library/Zend/Registry.php:70
Zend_Registry::setInstance() at /var/www/admin/current/application/Bootstrap.php:9
Bootstrap->_initRegistry() at /var/www/admin/current/vendor/zendframework/zendframework1/library/Zend/Application/Bootstrap/BootstrapAbstract.php:681
Zend_Application_Bootstrap_BootstrapAbstract->_executeResource() at /var/www/admin/current/vendor/zendframework/zendframework1/library/Zend/Application/Bootstrap/BootstrapAbstract.php:634
Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap() at /var/www/admin/current/vendor/zendframework/zendframework1/library/Zend/Application/Bootstrap/BootstrapAbstract.php:598
Zend_Application_Bootstrap_BootstrapAbstract->bootstrap() at /var/www/admin/current/vendor/zendframework/zendframework1/library/Zend/Application.php:373
Zend_Application->bootstrap() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/Module/ZF1.php:132
Codeception\Module\ZF1->_before() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/Subscriber/Module.php:58
Codeception\Subscriber\Module->before() at n/a:n/a
call_user_func() at /var/www/admin/current/vendor/symfony/event-dispatcher/EventDispatcher.php:171
Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() at /var/www/admin/current/vendor/symfony/event-dispatcher/EventDispatcher.php:43
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/PHPUnit/Listener.php:121
Codeception\PHPUnit\Listener->fire() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/PHPUnit/Listener.php:92
Codeception\PHPUnit\Listener->startTest() at /var/www/admin/current/vendor/phpunit/phpunit/src/Framework/TestResult.php:327
PHPUnit_Framework_TestResult->startTest() at /var/www/admin/current/vendor/phpunit/phpunit/src/Framework/TestResult.php:552
PHPUnit_Framework_TestResult->run() at /var/www/admin/current/vendor/phpunit/phpunit/src/Framework/TestCase.php:724
PHPUnit_Framework_TestCase->run() at /var/www/admin/current/vendor/phpunit/phpunit/src/Framework/TestSuite.php:747
PHPUnit_Framework_TestSuite->run() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/PHPUnit/Runner.php:89
Codeception\PHPUnit\Runner->doEnhancedRun() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/SuiteManager.php:153
Codeception\SuiteManager->run() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/Codecept.php:203
Codeception\Codecept->runSuite() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/Codecept.php:172
Codeception\Codecept->run() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/Command/Run.php:262
Codeception\Command\Run->runSuites() at /var/www/admin/current/vendor/codeception/codeception/src/Codeception/Command/Run.php:189
Codeception\Command\Run->execute() at /var/www/admin/current/vendor/symfony/console/Command/Command.php:256
Symfony\Component\Console\Command\Command->run() at /var/www/admin/current/vendor/symfony/console/Application.php:791
Symfony\Component\Console\Application->doRunCommand() at /var/www/admin/current/vendor/symfony/console/Application.php:186
Symfony\Component\Console\Application->doRun() at /var/www/admin/current/vendor/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at /var/www/admin/current/vendor/codeception/codeception/codecept:28

@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Mar 2, 2016

Member

If you want a quick solution, call Zend_Registry::_unsetInstance() before Zend_Registry::setInstance() in /var/www/admin/current/application/Bootstrap.php

Member

Naktibalda commented Mar 2, 2016

If you want a quick solution, call Zend_Registry::_unsetInstance() before Zend_Registry::setInstance() in /var/www/admin/current/application/Bootstrap.php

Naktibalda added a commit to Naktibalda/Codeception that referenced this issue Mar 2, 2016

@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Mar 2, 2016

Member

I reproduced and fixed this issue.

Member

Naktibalda commented Mar 2, 2016

I reproduced and fixed this issue.

Naktibalda added a commit that referenced this issue Mar 2, 2016

Merge pull request #2873 from Naktibalda/zf1-unset-registry
[ZF1] Call Zend_Registry::_unsetInstance in _after #2863
@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Mar 2, 2016

Member

Merged to 2.1 branch.

Member

Naktibalda commented Mar 2, 2016

Merged to 2.1 branch.

@Naktibalda Naktibalda closed this Mar 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment