Disable PHPUnit tests that fail under postgres
authorKunal Mehta <legoktm@member.fsf.org>
Wed, 1 Aug 2018 07:25:32 +0000 (00:25 -0700)
committerKrinkle <krinklemail@gmail.com>
Wed, 1 Aug 2018 22:22:15 +0000 (22:22 +0000)
So we can make the job voting, preventing other tests from regressing.
These tests can be re-enabled whenever they're made to pass.

Bug: T195807
Change-Id: I58261dd70eea3581803987a4a7739c7d55558f42

tests/phpunit/includes/PrefixSearchTest.php
tests/phpunit/includes/Storage/NameTableStoreTest.php
tests/phpunit/includes/Storage/RevisionStoreDbTestBase.php
tests/phpunit/includes/Storage/SqlBlobStoreTest.php
tests/phpunit/includes/api/ApiBaseTest.php
tests/phpunit/includes/changetags/ChangeTagsTest.php
tests/phpunit/includes/page/PageArchiveTestBase.php
tests/phpunit/includes/page/WikiPageDbTestBase.php
tests/phpunit/includes/user/UserTest.php
tests/phpunit/maintenance/deleteAutoPatrolLogsTest.php

index 3bde5de..f12fe1d 100644 (file)
@@ -209,6 +209,8 @@ class PrefixSearchTest extends MediaWikiLangTestCase {
         * @covers PrefixSearch::searchBackend
         */
        public function testSearch( array $case ) {
+               // FIXME: fails under postgres
+               $this->markTestSkippedIfDbType( 'postgres' );
                $this->searchProvision( null );
 
                $namespaces = $case['namespaces'] ?? [];
@@ -233,6 +235,8 @@ class PrefixSearchTest extends MediaWikiLangTestCase {
         * @covers PrefixSearch::searchBackend
         */
        public function testSearchWithOffset( array $case ) {
+               // FIXME: fails under postgres
+               $this->markTestSkippedIfDbType( 'postgres' );
                $this->searchProvision( null );
 
                $namespaces = $case['namespaces'] ?? [];
index e5104d8..b5b2e0d 100644 (file)
@@ -299,6 +299,9 @@ class NameTableStoreTest extends MediaWikiTestCase {
        }
 
        public function testGetAndAcquireIdInsertCallback() {
+               // FIXME: fails under postgres
+               $this->markTestSkippedIfDbType( 'postgres' );
+
                $store = $this->getNameTableSqlStore(
                        new EmptyBagOStuff(),
                        1,
index 110f032..ad1e013 100644 (file)
@@ -397,6 +397,9 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase {
        public function testInsertRevisionOn_successes(
                array $revDetails = []
        ) {
+               // FIXME: fails under postgres
+               $this->markTestSkippedIfDbType( 'postgres' );
+
                $title = $this->getTestPageTitle();
                $rev = $this->getRevisionRecordFromDetailsArray( $revDetails );
 
index b5f7322..a40f09c 100644 (file)
@@ -244,6 +244,8 @@ class SqlBlobStoreTest extends MediaWikiTestCase {
         * @covers \MediaWiki\Storage\SqlBlobStore::getBlob
         */
        public function testSimpleStoreGetBlobSimpleRoundtripWindowsLegacyEncodingGzip( $blob ) {
+               // FIXME: fails under postgres
+               $this->markTestSkippedIfDbType( 'postgres' );
                $store = $this->getBlobStore( 'windows-1252', true );
                $address = $store->storeBlob( $blob );
                $this->assertSame( $blob, $store->getBlob( $address ) );
index 866848b..121820a 100644 (file)
@@ -175,6 +175,9 @@ class ApiBaseTest extends ApiTestCase {
        }
 
        public function testGetTitleOrPageIdInvalidPageId() {
+               // FIXME: fails under postgres
+               $this->markTestSkippedIfDbType( 'postgres' );
+
                $this->setExpectedException( ApiUsageException::class,
                        'There is no page with ID 2147483648.' );
                $mock = new MockApi();
index 03d0579..3ef4f05 100644 (file)
@@ -382,6 +382,9 @@ class ChangeTagsTest extends MediaWikiTestCase {
        }
 
        public function testUpdateTagsMigrationWriteBoth() {
+               // FIXME: fails under postgres
+               $this->markTestSkippedIfDbType( 'postgres' );
+
                $this->setMwGlobals( 'wgChangeTagsSchemaMigrationStage', MIGRATION_WRITE_BOTH );
                $dbw = wfGetDB( DB_MASTER );
                $dbw->delete( 'change_tag', '*' );
index 27e5861..2dd4ba1 100644 (file)
@@ -187,6 +187,9 @@ abstract class PageArchiveTestBase extends MediaWikiTestCase {
         * @covers PageArchive::listRevisions
         */
        public function testListRevisions() {
+               // FIXME: fails under postgres
+               $this->markTestSkippedIfDbType( 'postgres' );
+
                $revisions = $this->archivedPage->listRevisions();
                $this->assertEquals( 2, $revisions->numRows() );
 
index f3cd087..5973d9e 100644 (file)
@@ -1051,6 +1051,9 @@ more stuff
         * @covers WikiPage::commitRollback
         */
        public function testDoRollback() {
+               // FIXME: fails under postgres
+               $this->markTestSkippedIfDbType( 'postgres' );
+
                $admin = $this->getTestSysop()->getUser();
                $user1 = $this->getTestUser()->getUser();
                // Use the confirmed group for user2 to make sure the user is different
@@ -1569,8 +1572,9 @@ more stuff
                $expectedSuccess,
                $expectedRowCount
        ) {
-               // FIXME: fails under sqlite
+               // FIXME: fails under sqlite and postgres
                $this->markTestSkippedIfDbType( 'sqlite' );
+               $this->markTestSkippedIfDbType( 'postgres' );
                static $pageCounter = 0;
                $pageCounter++;
 
index 169a7c5..2ac91d5 100644 (file)
@@ -539,6 +539,9 @@ class UserTest extends MediaWikiTestCase {
         * @covers User::findUsersByGroup
         */
        public function testFindUsersByGroup() {
+               // FIXME: fails under postgres
+               $this->markTestSkippedIfDbType( 'postgres' );
+
                $users = User::findUsersByGroup( [] );
                $this->assertEquals( 0, iterator_count( $users ) );
 
index 19e93de..42569d7 100644 (file)
@@ -245,6 +245,9 @@ class DeleteAutoPatrolLogsTest extends MaintenanceBaseTestCase {
         * @dataProvider runProvider
         */
        public function testRun( $expected, $args ) {
+               // FIXME: fails under postgres
+               $this->markTestSkippedIfDbType( 'postgres' );
+
                $this->maintenance->loadWithArgv( $args );
 
                $this->maintenance->execute();