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

[Unit tests] - Could not execute errors in /app/test/unittests/Database_Test.php #6778

Closed
laemtl opened this issue Jun 29, 2020 · 3 comments
Closed
Labels
Cleanup PR or issue introducing/requiring at least one clean-up operation State: Discussion required PR or issue that requires the resolution of a discussion with the relevant parties to proceed

Comments

@laemtl
Copy link
Contributor

laemtl commented Jun 29, 2020

An error_log in DatabaseException::__construct() causes Travis to prints some Could not execute [...] errors when running the tests in /app/test/unittests/Database_Test.php expected to throw exceptions.

This is polluting the output and makes error hunting more difficult.

@laemtl laemtl added the Category: Bug PR or issue that aims to report or fix a bug label Jun 29, 2020
@laemtl
Copy link
Contributor Author

laemtl commented Jun 29, 2020

...Could not execute SELECT ID, Name FROM ConfigSettings. Stack trace#0 /app/test/unittests/Database_Test.php(1184): Database->pselectCol('SELECT ID, Name...', Array)
#1 [internal function]: Database_Test->testPselectColThrowsException()
#2 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(1156): ReflectionMethod->invokeArgs(Object(Database_Test), Array)
#3 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(729): PHPUnit\Framework\TestCase->runTest()
#4 /app/vendor/phpunit/phpunit/src/Framework/TestResult.php(710): PHPUnit\Framework\TestCase->runBare()
#5 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(687): PHPUnit\Framework\TestResult->run(Object(Database_Test))
#6 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#7 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#8 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#9 /app/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(508): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#10 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(205): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
#11 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(153): PHPUnit\TextUI\Command->run(Array, true)
#12 /app/vendor/phpunit/phpunit/phpunit(53): PHPUnit\TextUI\Command::main()
#13 {main}

......I..Could not execute SELECT ID, Name FROM ConfigSettings. Stack trace#0 /app/test/unittests/Database_Test.php(1388): Database->pselectWithIndexKey('SELECT ID, Name...', Array, 'Test')
#1 [internal function]: Database_Test->testPselectWithIndexKeyThrowsDbException()
#2 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(1156): ReflectionMethod->invokeArgs(Object(Database_Test), Array)
#3 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(729): PHPUnit\Framework\TestCase->runTest()
#4 /app/vendor/phpunit/phpunit/src/Framework/TestResult.php(710): PHPUnit\Framework\TestCase->runBare()
#5 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(687): PHPUnit\Framework\TestResult->run(Object(Database_Test))
#6 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#7 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#8 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#9 /app/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(508): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#10 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(205): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
#11 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(153): PHPUnit\TextUI\Command->run(Array, true)
#12 /app/vendor/phpunit/phpunit/phpunit(53): PHPUnit\TextUI\Command::main()
#13 {main}

...Could not execute SELECT Name FROM ConfigSettings. Stack trace#0 /app/test/unittests/Database_Test.php(1487): Database->pselectColWithIndexKey('SELECT Name FRO...', Array, 'ID')
#1 [internal function]: Database_Test->testPselectColWithIndexKeyThrowsDbExceptionOne()
#2 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(1156): ReflectionMethod->invokeArgs(Object(Database_Test), Array)
#3 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(729): PHPUnit\Framework\TestCase->runTest()
#4 /app/vendor/phpunit/phpunit/src/Framework/TestResult.php(710): PHPUnit\Framework\TestCase->runBare()
#5 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(687): PHPUnit\Framework\TestResult->run(Object(Database_Test))
#6 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#7 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#8 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#9 /app/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(508): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#10 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(205): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
#11 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(153): PHPUnit\TextUI\Command->run(Array, true)
#12 /app/vendor/phpunit/phpunit/phpunit(53): PHPUnit\TextUI\Command::main()
#13 {main}
.Could not execute SELECT Visible, Name FROM ConfigSettings. Stack trace#0 /app/test/unittests/Database_Test.php(1519): Database->pselectColWithIndexKey('SELECT Visible,...', Array, 'Visible')
#1 [internal function]: Database_Test->testPselectColWithIndexKeyThrowsDbExceptionTwo()
#2 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(1156): ReflectionMethod->invokeArgs(Object(Database_Test), Array)
#3 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(729): PHPUnit\Framework\TestCase->runTest()
#4 /app/vendor/phpunit/phpunit/src/Framework/TestResult.php(710): PHPUnit\Framework\TestCase->runBare()
#5 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(687): PHPUnit\Framework\TestResult->run(Object(Database_Test))
#6 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#7 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#8 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#9 /app/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(508): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#10 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(205): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
#11 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(153): PHPUnit\TextUI\Command->run(Array, true)
#12 /app/vendor/phpunit/phpunit/phpunit(53): PHPUnit\TextUI\Command::main()
#13 {main}
.....Could not execute . Stack trace#0 /app/test/unittests/Database_Test.php(1616): Database->beginTransaction()
#1 [internal function]: Database_Test->testBeginTransactionThrowsException()
#2 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(1156): ReflectionMethod->invokeArgs(Object(Database_Test), Array)
#3 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(729): PHPUnit\Framework\TestCase->runTest()
#4 /app/vendor/phpunit/phpunit/src/Framework/TestResult.php(710): PHPUnit\Framework\TestCase->runBare()
#5 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(687): PHPUnit\Framework\TestResult->run(Object(Database_Test))
#6 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#7 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#8 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#9 /app/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(508): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#10 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(205): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
#11 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(153): PHPUnit\TextUI\Command->run(Array, true)
#12 /app/vendor/phpunit/phpunit/phpunit(53): PHPUnit\TextUI\Command::main()
#13 {main}
..Could not execute . Stack trace#0 /app/test/unittests/Database_Test.php(1654): Database->rollBack()
#1 [internal function]: Database_Test->testRollbackThrowsException()
#2 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(1156): ReflectionMethod->invokeArgs(Object(Database_Test), Array)
#3 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(729): PHPUnit\Framework\TestCase->runTest()
#4 /app/vendor/phpunit/phpunit/src/Framework/TestResult.php(710): PHPUnit\Framework\TestCase->runBare()
#5 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(687): PHPUnit\Framework\TestResult->run(Object(Database_Test))
#6 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#7 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#8 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#9 /app/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(508): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#10 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(205): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
#11 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(153): PHPUnit\TextUI\Command->run(Array, true)
#12 /app/vendor/phpunit/phpunit/phpunit(53): PHPUnit\TextUI\Command::main()
#13 {main}
..Could not execute . Stack trace#0 /app/test/unittests/Database_Test.php(1692): Database->commit()
#1 [internal function]: Database_Test->testCommitThrowsException()
#2 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(1156): ReflectionMethod->invokeArgs(Object(Database_Test), Array)
#3 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(729): PHPUnit\Framework\TestCase->runTest()
#4 /app/vendor/phpunit/phpunit/src/Framework/TestResult.php(710): PHPUnit\Framework\TestCase->runBare()
#5 /app/vendor/phpunit/phpunit/src/Framework/TestCase.php(687): PHPUnit\Framework\TestResult->run(Object(Database_Test))
#6 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#7 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#8 /app/vendor/phpunit/phpunit/src/Framework/TestSuite.php(761): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#9 /app/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(508): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#10 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(205): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
#11 /app/vendor/phpunit/phpunit/src/TextUI/Command.php(153): PHPUnit\TextUI\Command->run(Array, true)
#12 /app/vendor/phpunit/phpunit/phpunit(53): PHPUnit\TextUI\Command::main()
#13 {main}

@laemtl laemtl changed the title [Integration tests] - Could not execute errors [Integration tests] - Could not execute errors in /app/test/unittests/Database_Test.php Jun 29, 2020
@laemtl laemtl changed the title [Integration tests] - Could not execute errors in /app/test/unittests/Database_Test.php [Unit tests] - Could not execute errors in /app/test/unittests/Database_Test.php Jun 29, 2020
@laemtl
Copy link
Contributor Author

laemtl commented Jun 29, 2020

Seems to be related to #6553

@laemtl laemtl added Cleanup PR or issue introducing/requiring at least one clean-up operation State: Discussion required PR or issue that requires the resolution of a discussion with the relevant parties to proceed and removed Category: Bug PR or issue that aims to report or fix a bug labels Jun 29, 2020
@laemtl
Copy link
Contributor Author

laemtl commented Dec 20, 2022

Fixed

@laemtl laemtl closed this as completed Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup PR or issue introducing/requiring at least one clean-up operation State: Discussion required PR or issue that requires the resolution of a discussion with the relevant parties to proceed
Projects
None yet
Development

No branches or pull requests

1 participant