summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>2022-01-22 18:56:34 +0000
committerGerrit Code Review <gerrit@wikimedia.org>2022-01-22 18:56:34 +0000
commit3e11a089261635f9c0f78e4c43ac82e35b02e1ac (patch)
treeb9925251cc598df56ffff1149890643c5affc597
parent0e444ddb6eb44a920db039b9b770735d065560f0 (diff)
parent977f0c0c19836c61019598db047b47b279a89a76 (diff)
Merge "Remove passing markTestSkippedIfDbType or add comment"
-rw-r--r--tests/phpunit/includes/Storage/NameTableStoreTest.php2
-rw-r--r--tests/phpunit/includes/Storage/SqlBlobStoreTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiBaseTest.php3
-rw-r--r--tests/phpunit/includes/api/query/ApiQueryUserContribsTest.php3
-rw-r--r--tests/phpunit/includes/search/PrefixSearchTest.php14
-rw-r--r--tests/phpunit/includes/user/UserTest.php3
-rw-r--r--tests/phpunit/tests/MediaWikiIntegrationTestCaseSchema1Test.php2
-rw-r--r--tests/phpunit/tests/MediaWikiIntegrationTestCaseSchema2Test.php2
8 files changed, 4 insertions, 27 deletions
diff --git a/tests/phpunit/includes/Storage/NameTableStoreTest.php b/tests/phpunit/includes/Storage/NameTableStoreTest.php
index 18dc2d26b126..b84cc05571cd 100644
--- a/tests/phpunit/includes/Storage/NameTableStoreTest.php
+++ b/tests/phpunit/includes/Storage/NameTableStoreTest.php
@@ -333,7 +333,7 @@ class NameTableStoreTest extends MediaWikiIntegrationTestCase {
}
public function testGetAndAcquireIdInsertCallback() {
- // FIXME: fails under postgres
+ // Postgres does not allow to specify the SERIAL column on insert to fake an id
$this->markTestSkippedIfDbType( 'postgres' );
$store = $this->getNameTableSqlStore(
diff --git a/tests/phpunit/includes/Storage/SqlBlobStoreTest.php b/tests/phpunit/includes/Storage/SqlBlobStoreTest.php
index 3b7730643ae3..4d435b311acd 100644
--- a/tests/phpunit/includes/Storage/SqlBlobStoreTest.php
+++ b/tests/phpunit/includes/Storage/SqlBlobStoreTest.php
@@ -425,7 +425,7 @@ class SqlBlobStoreTest extends MediaWikiIntegrationTestCase {
* @covers \MediaWiki\Storage\SqlBlobStore::getBlob
*/
public function testSimpleStoreGetBlobSimpleRoundtripWindowsLegacyEncodingGzip( $blob ) {
- // FIXME: fails under postgres
+ // FIXME: fails under postgres - T298692
$this->markTestSkippedIfDbType( 'postgres' );
$store = $this->getBlobStore();
$store->setLegacyEncoding( 'windows-1252' );
diff --git a/tests/phpunit/includes/api/ApiBaseTest.php b/tests/phpunit/includes/api/ApiBaseTest.php
index 223bb42166a5..e7cf45c88f99 100644
--- a/tests/phpunit/includes/api/ApiBaseTest.php
+++ b/tests/phpunit/includes/api/ApiBaseTest.php
@@ -186,9 +186,6 @@ class ApiBaseTest extends ApiTestCase {
}
public function testGetTitleOrPageIdInvalidPageId() {
- // FIXME: fails under postgres
- $this->markTestSkippedIfDbType( 'postgres' );
-
$this->expectException( ApiUsageException::class );
$this->expectExceptionMessage( 'There is no page with ID 2147483648.' );
$mock = new MockApi();
diff --git a/tests/phpunit/includes/api/query/ApiQueryUserContribsTest.php b/tests/phpunit/includes/api/query/ApiQueryUserContribsTest.php
index 75537466d6e4..d5d6ecef159f 100644
--- a/tests/phpunit/includes/api/query/ApiQueryUserContribsTest.php
+++ b/tests/phpunit/includes/api/query/ApiQueryUserContribsTest.php
@@ -41,9 +41,6 @@ class ApiQueryUserContribsTest extends ApiTestCase {
* @param int $revs Number of revisions to expect
*/
public function testSorting( $params, $reverse, $revs ) {
- // FIXME: fails under sqlite
- $this->markTestSkippedIfDbType( 'sqlite' );
-
if ( isset( $params['ucuserids'] ) ) {
$params['ucuserids'] = implode( '|', array_map( [ User::class, 'idFromName' ], $params['ucuserids'] ) );
}
diff --git a/tests/phpunit/includes/search/PrefixSearchTest.php b/tests/phpunit/includes/search/PrefixSearchTest.php
index c6e8fdedec3f..9b8cb76921b4 100644
--- a/tests/phpunit/includes/search/PrefixSearchTest.php
+++ b/tests/phpunit/includes/search/PrefixSearchTest.php
@@ -190,17 +190,10 @@ 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'] ?? [];
- if ( wfGetDB( DB_REPLICA )->getType() === 'postgres' ) {
- // Postgres will sort lexicographically on utf8 code units (" " before "/")
- sort( $case['results'], SORT_STRING );
- }
-
$searcher = new StringPrefixSearch;
$results = $searcher->search( $case['query'], 3, $namespaces );
$this->assertEquals(
@@ -216,8 +209,6 @@ 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'] ?? [];
@@ -225,11 +216,6 @@ class PrefixSearchTest extends MediaWikiLangTestCase {
$searcher = new StringPrefixSearch;
$results = $searcher->search( $case['query'], 3, $namespaces, 1 );
- if ( wfGetDB( DB_REPLICA )->getType() === 'postgres' ) {
- // Postgres will sort lexicographically on utf8 code units (" " before "/")
- sort( $case['results'], SORT_STRING );
- }
-
// We don't expect the first result when offsetting
array_shift( $case['results'] );
// And sometimes we expect a different last result
diff --git a/tests/phpunit/includes/user/UserTest.php b/tests/phpunit/includes/user/UserTest.php
index 241d8ee9d6ee..fb28d5f5cd18 100644
--- a/tests/phpunit/includes/user/UserTest.php
+++ b/tests/phpunit/includes/user/UserTest.php
@@ -560,9 +560,6 @@ class UserTest extends MediaWikiIntegrationTestCase {
* @covers User::findUsersByGroup
*/
public function testFindUsersByGroup() {
- // FIXME: fails under postgres
- $this->markTestSkippedIfDbType( 'postgres' );
-
$users = User::findUsersByGroup( [] );
$this->assertSame( 0, iterator_count( $users ) );
diff --git a/tests/phpunit/tests/MediaWikiIntegrationTestCaseSchema1Test.php b/tests/phpunit/tests/MediaWikiIntegrationTestCaseSchema1Test.php
index ad6e8d217270..69c2d0a74b04 100644
--- a/tests/phpunit/tests/MediaWikiIntegrationTestCaseSchema1Test.php
+++ b/tests/phpunit/tests/MediaWikiIntegrationTestCaseSchema1Test.php
@@ -12,7 +12,7 @@ class MediaWikiIntegrationTestCaseSchema1Test extends MediaWikiIntegrationTestCa
protected function setUp(): void {
parent::setUp();
- // FIXME: fails under postgres
+ // FIXME: fails under postgres - T198222
$this->markTestSkippedIfDbType( 'postgres' );
}
diff --git a/tests/phpunit/tests/MediaWikiIntegrationTestCaseSchema2Test.php b/tests/phpunit/tests/MediaWikiIntegrationTestCaseSchema2Test.php
index 8d73e188d759..39c948493fdb 100644
--- a/tests/phpunit/tests/MediaWikiIntegrationTestCaseSchema2Test.php
+++ b/tests/phpunit/tests/MediaWikiIntegrationTestCaseSchema2Test.php
@@ -14,7 +14,7 @@ class MediaWikiIntegrationTestCaseSchema2Test extends MediaWikiIntegrationTestCa
protected function setUp(): void {
parent::setUp();
- // FIXME: fails under postgres
+ // FIXME: fails under postgres - T198222
$this->markTestSkippedIfDbType( 'postgres' );
}