https://bugzilla.wikimedia.org/show_bug.cgi?id=73139
Bug ID: 73139
Summary: PostgreSQL phpunit testing transaction problem
Product: MediaWiki
Version: 1.25-git
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Unprioritized
Component: Database
Assignee: [email protected]
Reporter: [email protected]
Web browser: ---
Mobile Platform: ---
Change-Id I3f47675646d772 converts from explicit transactions to using
"startAtomic", which according to the documentation is more strict than
directly using transactions.
This breaks phpunit tests for PostgreSQL. Not just a specific test fails,
rather it breaks the testing framework itself.
I don't know where this bug might be, I suspect there might more than one of
them involved.. It seems like, if nothing else, the unit test should at least
catch the error and report it, rather than aborting the test sequence. But I
don't why it isn't doing that.
PHP Notice: DatabasePostgres::reportQueryError: Explicit rollback of implicit
transaction. Something may be out of sync! [Called from DatabaseBase::rollback
in /usr/local/apache2/htdocs/wiki_git/includes/db/Database.php at line 3620] in
/usr/local/apache2/htdocs/wiki_git/includes/debug/MWDebug.php on line 302
PHP Stack trace:
PHP 1. {main}()
/usr/local/apache2/htdocs/wiki_git/tests/phpunit/phpunit.php:0
PHP 2. PHPUnit_TextUI_Command::main()
/usr/local/apache2/htdocs/wiki_git/tests/phpunit/phpunit.php:233
PHP 3. PHPUnit_TextUI_Command->run()
/usr/local/apache2/htdocs/wiki_git/vendor/phpunit/phpunit/src/TextUI/Command.php:138
PHP 4. PHPUnit_TextUI_TestRunner->doRun()
/usr/local/apache2/htdocs/wiki_git/vendor/phpunit/phpunit/src/TextUI/Command.php:186
PHP 5. PHPUnit_Framework_TestSuite->run()
/usr/local/apache2/htdocs/wiki_git/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:423
PHP 6. PHPUnit_Framework_TestSuite->run()
/usr/local/apache2/htdocs/wiki_git/vendor/phpunit/phpunit/src/Framework/TestSuite.php:751
PHP 7. PHPUnit_Framework_TestSuite->run()
/usr/local/apache2/htdocs/wiki_git/vendor/phpunit/phpunit/src/Framework/TestSuite.php:751
PHP 8. MediaWikiTestCase->run()
/usr/local/apache2/htdocs/wiki_git/vendor/phpunit/phpunit/src/Framework/TestSuite.php:751
PHP 9. MediaWikiTestCase->addCoreDBData()
/usr/local/apache2/htdocs/wiki_git/tests/phpunit/MediaWikiTestCase.php:133
PHP 10. User->idForName()
/usr/local/apache2/htdocs/wiki_git/tests/phpunit/MediaWikiTestCase.php:470
PHP 11. DatabaseBase->selectField()
/usr/local/apache2/htdocs/wiki_git/includes/User.php:3526
PHP 12. DatabaseBase->select()
/usr/local/apache2/htdocs/wiki_git/includes/db/Database.php:1360
PHP 13. DatabaseBase->query()
/usr/local/apache2/htdocs/wiki_git/includes/db/Database.php:1650
PHP 14. DatabasePostgres->reportQueryError()
/usr/local/apache2/htdocs/wiki_git/includes/db/Database.php:1182
PHP 15. DatabaseBase->rollback()
/usr/local/apache2/htdocs/wiki_git/includes/db/DatabasePostgres.php:536
PHP 16. wfWarn()
/usr/local/apache2/htdocs/wiki_git/includes/db/Database.php:3620
PHP 17. MWDebug::warning()
/usr/local/apache2/htdocs/wiki_git/includes/GlobalFunctions.php:1159
PHP 18. MWDebug::sendMessage()
/usr/local/apache2/htdocs/wiki_git/includes/debug/MWDebug.php:157
PHP 19. trigger_error()
/usr/local/apache2/htdocs/wiki_git/includes/debug/MWDebug.php:302
A database query error has occurred.
Query: SELECT user_id FROM "unittest_mwuser" WHERE user_name = 'UTSysop'
LIMIT 1
Function: User::idForName
Error: 25P02 ERROR: current transaction is aborted, commands ignored until end
of transaction block
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l