Last modified: 2014-07-27 00:16:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T69148, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67148 - Math tests dies when run with the Echo extensions
Math tests dies when run with the Echo extensions
Status: NEW
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 68628 (view as bug list)
Depends on:
Blocks: 67216
  Show dependency treegraph
 
Reported: 2014-06-26 17:57 UTC by Antoine "hashar" Musso (WMF)
Modified: 2014-07-27 00:16 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Antoine "hashar" Musso (WMF) 2014-06-26 17:57:52 UTC
I have try running the unit tests with both Echo and Math installed and ends up with a database error:

$ ls -1 extensions
Echo
Math
README

$ cd tests/phpunit
$ php phpunit.php --tap --testsuite extensions
not ok 588 - Error: MathDatabaseTest::testCreateTable
A database query error has occurred.
Query: DELETE FROM unittest_math
Function: MediaWikiTestCase::resetDB
Error: 1 no such table: unittest_math


---

#0 /core/includes/db/Database.php(1134): DatabaseBase->reportQueryError('no such table: ...', 1, 'DELETE FROM uni...', 'MediaWikiTestCa...', false)
#1 /core/includes/db/Database.php(2919): DatabaseBase->query('DELETE FROM uni...', 'MediaWikiTestCa...')
#2 /core/tests/phpunit/MediaWikiTestCase.php(572): DatabaseBase->delete('math', '*', 'MediaWikiTestCa...')
#3 /core/tests/phpunit/MediaWikiTestCase.php(138): MediaWikiTestCase->resetDB()
#4 /pear/PHPUnit/Framework/TestSuite.php(775): MediaWikiTestCase->run(Object(PHPUnit_Framework_TestResult))
#5 /pear/PHPUnit/Framework/TestSuite.php(745): PHPUnit_Framework_TestSuite->runTest(Object(MathDatabaseTest), Object(PHPUnit_Framework_TestResult))
#6 /pear/PHPUnit/Framework/TestSuite.php(705): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
#7 /pear/PHPUnit/Framework/TestSuite.php(705): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
#8 /pear/PHPUnit/Framework/TestSuite.php(705): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
#9 /pear/PHPUnit/TextUI/TestRunner.php(349): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
#10 /pear/PHPUnit/TextUI/Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
#11 /core/tests/phpunit/MediaWikiPHPUnitCommand.php(42): PHPUnit_TextUI_Command->run(Array, true)
#12 /core/tests/phpunit/phpunit.php(160): MediaWikiPHPUnitCommand::main()
#13 {main}



Also the Math extension seems to be running the updater in the test.
Comment 1 Antoine "hashar" Musso (WMF) 2014-06-26 18:00:49 UTC
tests/MathDatabaseTest.php has:

 public function testCreateTable() {
  ...
  $dbu->doUpdates( array( "extensions" ) );
  ...

among other. Commenting out the function let us continue the test suite.
Comment 2 physikerwelt 2014-06-27 16:50:03 UTC
did you run update.php before?
As far as I understand the database tests copy the schema with and prefix the tables with untitest. If there is no math table in the base schema no table will be created in the copied unittest schema.
The database test tries to delete the test schema and creates a new one.
We should either improve the error message or ignore the missing math table in the  main database. I don't know which option is better?
Comment 3 Antoine "hashar" Musso (WMF) 2014-06-27 19:50:54 UTC
I did ran update.php

A slightly more complicated test I ran in Jenkins is:

https://integration.wikimedia.org/ci/job/mediawiki-core-extensions-integration/38/consoleFull


It clones a bunch of extensions, load their entry points then run install.php and then update.php

 00:01:04.861 Creating math table ...done.


The dberror:

 Thu Jun 26 16:15:01 UTC 2014	gallium	build38-unittest_	MediaWikiTestCase::resetDB		1	no such table: unittest_math	DELETE FROM unittest_math
Comment 4 Gerrit Notification Bot 2014-06-27 22:24:44 UTC
Change 142739 had a related patch set uploaded by Physikerwelt:
Fix MathDatabaseTest

https://gerrit.wikimedia.org/r/142739
Comment 5 Antoine "hashar" Musso (WMF) 2014-06-30 14:08:44 UTC
We really need tests to pass when all wmf extensions are installed together. That is preventing us from progression toward the HHVM migrating. Raising priority to High.
Comment 6 physikerwelt 2014-06-30 14:54:40 UTC
does the problem disappear if you disable the Echo module?
Are those tests using sqlite?
Comment 7 Antoine "hashar" Musso (WMF) 2014-06-30 16:26:20 UTC
Sure! See comment 1. Install a stock MediaWiki core with extensions Echo and Math.  That should trigger the issue.
Comment 8 Gerrit Notification Bot 2014-07-11 01:37:21 UTC
Change 142739 merged by jenkins-bot:
Fix MathDatabaseTest

https://gerrit.wikimedia.org/r/142739
Comment 9 Max Semenik 2014-07-25 00:19:27 UTC
Antoine, is it fine for you now?
Comment 10 Antoine "hashar" Musso (WMF) 2014-07-25 07:52:03 UTC
Still the same error with latest master of Math Echo and core:

not ok 588 - Error: MathDatabaseTest::testCreateTable
A database query error has occurred.
Query: DELETE FROM unittest_math
Function: MediaWikiTestCase::resetDB
Error: 1 no such table: unittest_math
Comment 11 Antoine "hashar" Musso (WMF) 2014-07-26 21:05:29 UTC
*** Bug 68628 has been marked as a duplicate of this bug. ***
Comment 12 physikerwelt 2014-07-27 00:16:51 UTC
This Bug is not related to the math extension.
My experience is the following
At first I could reproduce a similar error as reported in the bug report. But the error indicated that database access related to the echo extension caused the error.
To investigate further I changed the order in the Localsettings.php an loaded Math before echo.
I wanted to reproduce exactly the problem that you had reported before. But no error occurred. After switching the order back the error did not come back.
AS a result I think the error is not related to the Math extension, rather to the sqllite db backend. Especially given the fact that the error does not occur with mysql

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links