diff options
author | Amir Sarabadani <ladsgroup@gmail.com> | 2023-07-31 20:28:18 +0200 |
---|---|---|
committer | Ladsgroup <Ladsgroup@gmail.com> | 2023-08-01 10:03:07 +0000 |
commit | 7da13fbf6cc9d06dbefa25a03bcb0a64f71f4046 (patch) | |
tree | d0908cfa2b509ab3aad9ba57ecb010141be271ef /tests/phpunit/includes/db/LBFactoryTest.php | |
parent | 2e1b44723e045a96d2fbc0533d6c19de9ea3b1c2 (diff) | |
download | mediawikicore-7da13fbf6cc9d06dbefa25a03bcb0a64f71f4046.tar.gz mediawikicore-7da13fbf6cc9d06dbefa25a03bcb0a64f71f4046.zip |
rdbms: Remove LB::getReplicaResumePos
It's only used in CP, CP doesn't really need replica positions. It only
needs the master position, if there is no connection to master, it means
either nothing happened on that section or connection got dropped
(extremely rare) and regardless, it's not worth the complexity and
specially a new method in LB that now almost every code piece can
access.
Bug: T342564
Bug: T326274
Change-Id: I0579e688a44d7a13d6b42622f7e88608f88e9841
Diffstat (limited to 'tests/phpunit/includes/db/LBFactoryTest.php')
-rw-r--r-- | tests/phpunit/includes/db/LBFactoryTest.php | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/phpunit/includes/db/LBFactoryTest.php b/tests/phpunit/includes/db/LBFactoryTest.php index 231ec59b855d..c9da989d2e01 100644 --- a/tests/phpunit/includes/db/LBFactoryTest.php +++ b/tests/phpunit/includes/db/LBFactoryTest.php @@ -276,8 +276,6 @@ class LBFactoryTest extends MediaWikiIntegrationTestCase { return $hasChangesFunc( $mockDB1 ); } ); - $lb1->method( 'getPrimaryPos' )->willReturn( $m1Pos ); - $lb1->method( 'getReplicaResumePos' )->willReturn( $m1Pos ); $lb1->method( 'getServerName' )->with( 0 )->willReturn( 'master1' ); // Primary DB 2 /** @var IDatabase|\PHPUnit\Framework\MockObject\MockObject $mockDB2 */ @@ -297,8 +295,6 @@ class LBFactoryTest extends MediaWikiIntegrationTestCase { return $hasChangesFunc( $mockDB2 ); } ); - $lb2->method( 'getPrimaryPos' )->willReturn( $m2Pos ); - $lb2->method( 'getReplicaResumePos' )->willReturn( $m2Pos ); $lb2->method( 'getServerName' )->with( 0 )->willReturn( 'master2' ); $bag = new HashBagOStuff(); |