Page MenuHomePhabricator

Call to undefined method Wikimedia\Rdbms\DatabaseMysqli::patchPath()
Closed, ResolvedPublic

Description

jay@JAY C:\xampp\htdocs\Dev\core
# php tests/parser/parserTests.php --file=tests/parser/parserTests.txt --record
This is MediaWiki version 1.32.0-alpha (ed5ffab).

WARNING> `testrun` table not found in database. Trying to create table.
[8e5d2ad1ddbf513f4ea98682] [no req]   Error from line 44 of C:\xampp\htdocs\Dev\core\tests\parser\DbTestRecorder.php: Call to undefined method Wikimedia\Rdbms\DatabaseMysqli::patchPath()
Backtrace:
#0 C:\xampp\htdocs\Dev\core\tests\parser\MultiTestRecorder.php(16): DbTestRecorder->start()
#1 C:\xampp\htdocs\Dev\core\tests\parser\MultiTestRecorder.php(21): MultiTestRecorder->proxy(string, array)
#2 C:\xampp\htdocs\Dev\core\tests\parser\ParserTestRunner.php(674): MultiTestRecorder->start()
#3 C:\xampp\htdocs\Dev\core\tests\parser\parserTests.php(188): ParserTestRunner->runTestsFromFiles(array)
#4 C:\xampp\htdocs\Dev\core\maintenance\doMaintenance.php(94): ParserTestsMaintenance->execute()
#5 C:\xampp\htdocs\Dev\core\tests\parser\parserTests.php(199): require_once(string)
#6 {main}

If I am not wrong then It made sql table automatically and resume?

print "WARNING> `testrun` table not found in database. Trying to create table.\n";
$this->db->sourceFile( $this->db->patchPath( 'patch-testrun.sql' ) );
echo "OK, resuming.\n";

I am able to run all parser test without --record parameter. But My console is not able to show all 1462 tests, It show only last 100 test. So I need to record the test data.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

C:\xampp\htdocs\Dev\core\tests\parser\DbTestRecorder.php: Call to undefined method Wikimedia\Rdbms\DatabaseMysqli::patchPath()

That's weird because in ./includes/installer/DatabaseUpdater.php you have public function patchPath( IDatabase $db, $patch ) defined.

That's weird

@Aklapper Try yourself on core's master, php tests/parser/parserTests.php --file=tests/parser/parserTests.txt --record

Krinkle triaged this task as High priority.EditedJun 15 2018, 12:51 PM
Krinkle subscribed.

C:\xampp\htdocs\Dev\core\tests\parser\DbTestRecorder.php: Call to undefined method Wikimedia\Rdbms\DatabaseMysqli::patchPath()

That's weird because in ./includes/installer/DatabaseUpdater.php you have public function patchPath( IDatabase $db, $patch ) defined.

Indeed, but the error comes from tests/parser/DbTestRecorder.php which is calling it like $this->db->patchPath where $this->db is an IDatabase instance, not a DatabaseUpdater instance.

This is a regression from acdfb5806a619.

Krinkle removed a project: MediaWiki-libs-Rdbms.
Krinkle added a project: Performance-Team.
Krinkle added a subscriber: aaron.

Change 441945 had a related patch set uploaded (by Aaron Schulz; owner: Aaron Schulz):
[mediawiki/core@master] Avoid bad method call to patchPatch() in DbTestRecorder

https://gerrit.wikimedia.org/r/441945

@Jayprakash12345 Could you verify that it now works with latest master?

Once verified, I'll backport this to any active branches newer than 1.28. The issue was introduced in 1.28.0, but only backporting to 1.30+, because 1.28 and 1.29 are EOL.

Change 441945 merged by jenkins-bot:
[mediawiki/core@master] Avoid bad method call to patchPatch() in DbTestRecorder

https://gerrit.wikimedia.org/r/441945

Krinkle changed the task status from Open to Stalled.Jun 28 2018, 8:29 PM
Krinkle removed a project: Patch-For-Review.
Krinkle moved this task from Backlog to Core on the MW-1.31-release board.
Krinkle moved this task from General to In progress on the MediaWiki-Installer board.

@Jayprakash12345 Could you verify that it now works with latest master?

AdminisatorsMBP:core administrator$ php tests/parser/parserTests.php --file=tests/parser/parserTests.txt --record
This is MediaWiki version 1.32.0-alpha (ee40e61).

WARNING> `testrun` table not found in database. Trying to create table.
OK, resuming.
Running parser tests from "tests/parser/parserTests.txt"...
Running test Blank input... PASSED
........

Passed 1480 of 1480 tests (100%)... ALL TESTS PASSED!

AdminisatorsMBP:core administrator$

Also checked on sql database. All 1480 entry is there. At all Look Goods. Sorry for late response.

Change 443289 had a related patch set uploaded (by Krinkle; owner: Aaron Schulz):
[mediawiki/core@REL1_31] Avoid bad method call to patchPatch() in DbTestRecorder

https://gerrit.wikimedia.org/r/443289

Change 443290 had a related patch set uploaded (by Krinkle; owner: Aaron Schulz):
[mediawiki/core@REL1_30] Avoid bad method call to patchPatch() in DbTestRecorder

https://gerrit.wikimedia.org/r/443290

Vvjjkkii renamed this task from Call to undefined method Wikimedia\Rdbms\DatabaseMysqli::patchPath() to kidaaaaaaa.Jul 1 2018, 1:13 AM
Vvjjkkii changed the task status from Stalled to Open.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.

Change 443290 merged by jenkins-bot:
[mediawiki/core@REL1_30] Avoid bad method call to patchPatch() in DbTestRecorder

https://gerrit.wikimedia.org/r/443290

Change 443289 merged by jenkins-bot:
[mediawiki/core@REL1_31] Avoid bad method call to patchPatch() in DbTestRecorder

https://gerrit.wikimedia.org/r/443289