Skip to content
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

There is an error when I run the tests by executing ./run_all_tests.sh. And I follow the process of the code. I found that the test case before testAutoClearHistory is testPartialBeansAtSetup. This test case changed R::$currentDB but not changed it back. So I did a little modification to make the whole tests working. #753

Merged
merged 1 commit into from Nov 9, 2019

Conversation

@AlexanderYIXIAO
Copy link
Contributor

AlexanderYIXIAO commented Nov 7, 2019

There is an error when I run the tests by executing ./run_all_tests.sh. And I follow the process of the code. I found that the test case before testAutoClearHistory is testPartialBeansAtSetup. This test case changed R::$currentDB but not changed it back. So I did a little modification to make the whole tests working.

Testpack: RedUNIT\Base\Misc

===== DRIVER : (mysql) =====

RedUNIT\Base\Misc->testReferencedGetInBeans [RedUNIT\Base\Misc->testReferencedGetInBeans]
[6546][6547][6548]

RedUNIT\Base\Misc->testPartialBeansAtSetup [RedUNIT\Base\Misc->testPartialBeansAtSetup]
[6549]

RedUNIT\Base\Misc->testAutoClearHistory [RedUNIT\Base\Misc->testAutoClearHistory]

Sub testpack: Auto clear history

Fatal error: Uncaught PDOException: Could not connect to database (?). in /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php on line 1011

PDOException: Could not connect to database (?). in /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php on line 1011

Call Stack:
0.0003 410312 1. {main}() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/runtests.php:0
84.4031 11896992 2. RedUNIT\Base\Misc->run() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/runtests.php:275
84.4097 11916048 3. RedUNIT\Base\Misc->testAutoClearHistory() /myprojectpath/vendor/gabordemooij/redbean/testing/RedUNIT.php:82
84.4110 11917424 4. RedBeanPHP\Facade::store() /myprojectpath/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Misc.php:97
84.4110 11917424 5. RedBeanPHP\OODB->store() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:12443
84.4110 11917424 6. RedBeanPHP\Repository\Fluid->store() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:9887
84.4112 11917424 7. RedBeanPHP\Repository\Fluid->storeBean() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:8738
84.4113 11917424 8. RedBeanPHP\Repository\Fluid->createTableIfNotExists() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:9146
84.4114 11917424 9. RedBeanPHP\Repository\Fluid->tableExists() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:9014
84.4114 11917424 10. RedBeanPHP\QueryWriter\SQLiteT->tableExists() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:8912
84.4114 11917424 11. RedBeanPHP\QueryWriter\SQLiteT->getTables() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:5857
84.4114 11917424 12. RedBeanPHP\Adapter\DBAdapter->getCol() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:7232
84.4115 11917424 13. RedBeanPHP\Driver\RPDO->GetCol() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:4183
84.4115 11917424 14. RedBeanPHP\Driver\RPDO->GetAll() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:1056
84.4115 11917424 15. RedBeanPHP\Driver\RPDO->runQuery() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:1035
84.4115 11917424 16. RedBeanPHP\Driver\RPDO->connect() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:735

There is an error when I run the tests by executing ./run_all_tests.sh. And I follow the process of the code. I found that the test case before testAutoClearHistory is testPartialBeansAtSetup. This test case changed R::$currentDB but not changed it back. So I did a little modification to make the whole tests working.

Testpack: RedUNIT\Base\Misc

===== DRIVER : (mysql) =====

RedUNIT\Base\Misc->testReferencedGetInBeans [RedUNIT\Base\Misc->testReferencedGetInBeans]
[6546][6547][6548]

RedUNIT\Base\Misc->testPartialBeansAtSetup [RedUNIT\Base\Misc->testPartialBeansAtSetup]
[6549]

RedUNIT\Base\Misc->testAutoClearHistory [RedUNIT\Base\Misc->testAutoClearHistory]

Sub testpack: Auto clear history

Fatal error: Uncaught PDOException: Could not connect to database (?). in /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php on line 1011

PDOException: Could not connect to database (?). in /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php on line 1011

Call Stack:
0.0003 410312 1. {main}() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/runtests.php:0
84.4031 11896992 2. RedUNIT\Base\Misc->run() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/runtests.php:275
84.4097 11916048 3. RedUNIT\Base\Misc->testAutoClearHistory() /myprojectpath/vendor/gabordemooij/redbean/testing/RedUNIT.php:82
84.4110 11917424 4. RedBeanPHP\Facade::store() /myprojectpath/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Misc.php:97
84.4110 11917424 5. RedBeanPHP\OODB->store() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:12443
84.4110 11917424 6. RedBeanPHP\Repository\Fluid->store() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:9887
84.4112 11917424 7. RedBeanPHP\Repository\Fluid->storeBean() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:8738
84.4113 11917424 8. RedBeanPHP\Repository\Fluid->createTableIfNotExists() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:9146
84.4114 11917424 9. RedBeanPHP\Repository\Fluid->tableExists() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:9014
84.4114 11917424 10. RedBeanPHP\QueryWriter\SQLiteT->tableExists() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:8912
84.4114 11917424 11. RedBeanPHP\QueryWriter\SQLiteT->getTables() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:5857
84.4114 11917424 12. RedBeanPHP\Adapter\DBAdapter->getCol() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:7232
84.4115 11917424 13. RedBeanPHP\Driver\RPDO->GetCol() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:4183
84.4115 11917424 14. RedBeanPHP\Driver\RPDO->GetAll() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:1056
84.4115 11917424 15. RedBeanPHP\Driver\RPDO->runQuery() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:1035
84.4115 11917424 16. RedBeanPHP\Driver\RPDO->connect() /myprojectpath/vendor/gabordemooij/redbean/testing/cli/testcontainer/rb.php:735
@gabordemooij gabordemooij merged commit c9fbc66 into gabordemooij:master Nov 9, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.