Closed lucaswerkmeister closed 3 years ago
Based on #42 because otherwise I wouldn’t be able to run the API integration tests locally. I guess I could also rebase this to remove that commit if anyone would prefer that.
Nevermind, #42 was merged in the meantime :D
I also tested this:
diff --git a/tests/phpunit/integration/MediaWiki/Api/SingleEditEndpointTest.php b/tests/phpunit/integration/MediaWiki/Api/SingleEditEndpointTest.php
index ccb3dce..8723d4b 100644
--- a/tests/phpunit/integration/MediaWiki/Api/SingleEditEndpointTest.php
+++ b/tests/phpunit/integration/MediaWiki/Api/SingleEditEndpointTest.php
@@ -287,10 +287,6 @@ public function testItemStatementReconciliation( array $requests, array $expecte
$item = WikibaseRepo::getDefaultInstance()->getEntityLookup()->getEntity( $itemId );
$this->assertInstanceOf( Item::class, $item );
- // this needs to be reset in-order for the per-request "cache" to clear
- // @see ReconciliationService::$items
- MediaWikiServices::getInstance()->resetServiceForTesting( 'WikibaseReconcileEdit.ReconciliationService' );
-
$expectedRequestItems = $expectedItems[$requestIndex];
$this->assertEquals( $this->countItemsInDatabase(), count( $expectedRequestItems ) );
The test still passes, which means that the reconciliation service now behaves correctly when used for multiple requests in a row. (Though we still want to clear the cache for more realistic test behavior.)
Rebased without changes.
Bug: T284068