Page MenuHomePhabricator

Some test errors using SQLite and Docker container
Closed, ResolvedPublic

Description

I don't know if is my mistake or not but I have some issues trying to run the unit-tests for my Docker image.

You can check the full build error at:
https://travis-ci.org/thenets/docker-mediawiki/builds/394213219

The Dockerfile that I've created (based on official Wikimedia image) is:
https://github.com/thenets/docker-mediawiki/blob/master/Dockerfile

I'm using the SQlite as my database.

There were 6 failures:

1) ApiQueryContributionsTest::testSorting with data set "User IDs, write both" (1, array(array('ApiQueryContributionsTest A', 'ApiQueryContributionsTest B', 'ApiQueryContributionsTest C')), false, 9)
Batching with limit 1
Failed asserting that 10 is equal to 9 or is less than 9.
/var/www/html/tests/phpunit/includes/api/query/ApiQueryUserContributionsTest.php:115
/var/www/html/tests/phpunit/MediaWikiTestCase.php:421
/var/www/html/maintenance/doMaintenance.php:94

2) ApiQueryContributionsTest::testSorting with data set "User IDs, write both, reverse" (1, array(array('ApiQueryContributionsTest A', 'ApiQueryContributionsTest B', 'ApiQueryContributionsTest C')), true, 9)
Result set is the same when batching with limit 1
Failed asserting that Array &0 (
    'ApiQueryContributionsTest B' => Array &1 (
        0 => 56
    )
) is identical to Array &0 (
    'ApiQueryContributionsTest B' => Array &1 (
        0 => 56
        1 => 63
        2 => 70
    )
    'ApiQueryContributionsTest A' => Array &2 (
        0 => 55
        1 => 62
        2 => 69
    )
    'ApiQueryContributionsTest C' => Array &3 (
        0 => 54
        1 => 61
        2 => 68
    )
).
/var/www/html/tests/phpunit/includes/api/query/ApiQueryUserContributionsTest.php:117
/var/www/html/tests/phpunit/MediaWikiTestCase.php:421
/var/www/html/maintenance/doMaintenance.php:94

3) ApiQueryContributionsTest::testSorting with data set "User IDs, write new" (2, array(array('ApiQueryContributionsTest A', 'ApiQueryContributionsTest B', 'ApiQueryContributionsTest C')), false, 9)
Batching with limit 1
Failed asserting that 10 is equal to 9 or is less than 9.
/var/www/html/tests/phpunit/includes/api/query/ApiQueryUserContributionsTest.php:115
/var/www/html/tests/phpunit/MediaWikiTestCase.php:421
/var/www/html/maintenance/doMaintenance.php:94

4) ApiQueryContributionsTest::testSorting with data set "User IDs, write new, reverse" (2, array(array('ApiQueryContributionsTest A', 'ApiQueryContributionsTest B', 'ApiQueryContributionsTest C')), true, 9)
Result set is the same when batching with limit 1
Failed asserting that Array &0 (
    'ApiQueryContributionsTest B' => Array &1 (
        0 => 56
    )
) is identical to Array &0 (
    'ApiQueryContributionsTest B' => Array &1 (
        0 => 56
        1 => 63
        2 => 70
    )
    'ApiQueryContributionsTest A' => Array &2 (
        0 => 55
        1 => 62
        2 => 69
    )
    'ApiQueryContributionsTest C' => Array &3 (
        0 => 54
        1 => 61
        2 => 68
    )
).
/var/www/html/tests/phpunit/includes/api/query/ApiQueryUserContributionsTest.php:117
/var/www/html/tests/phpunit/MediaWikiTestCase.php:421
/var/www/html/maintenance/doMaintenance.php:94

5) WikiPageContentHandlerDbTest::testUpdateRedirectOn with data set #3 ('SomeText', false, 'Foo', false, false, 1)
Success assertion
Failed asserting that true matches expected false.
/var/www/html/tests/phpunit/includes/page/WikiPageDbTestBase.php:1195
/var/www/html/tests/phpunit/MediaWikiTestCase.php:421
/var/www/html/maintenance/doMaintenance.php:94

6) WikiPageNoContentHandlerDbTest::testUpdateRedirectOn with data set #3 ('SomeText', false, 'Foo', false, false, 1)
Success assertion
Failed asserting that true matches expected false.
/var/www/html/tests/phpunit/includes/page/WikiPageDbTestBase.php:1195
/var/www/html/tests/phpunit/MediaWikiTestCase.php:421
/var/www/html/maintenance/doMaintenance.php:94
FAILURES!

Tests: 18504, Assertions: 119126, Failures: 6, Skipped: 123.

Event Timeline

thenets renamed this task from Some errors using SQLite and Docker container to Some test errors using SQLite and Docker container.Jun 20 2018, 2:05 AM
Vvjjkkii renamed this task from Some test errors using SQLite and Docker container to pmaaaaaaaa.Jul 1 2018, 1:02 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from pmaaaaaaaa to Some test errors using SQLite and Docker container.Jul 2 2018, 1:16 PM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.

Change 756063 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] Avoid COUNT(*) in assertSelect() for WikiPageDbTest

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

Change 756063 merged by jenkins-bot:

[mediawiki/core@master] Avoid COUNT(*) in assertSelect() for WikiPageDbTest

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

Umherirrender added a subscriber: Umherirrender.

On every gate-and-submit test for mediawiki/core also sqlite tests are running and the tests are passing.

Assuming this is fixed. Or the failures are not depending on the rdbms system used for the tests and should be filled as separate tasks

On failing test for sqlite is marked with T259085 and tracked there.