Skip to content

Commit

Permalink
Merge pull request #1156 from frankverhoeven/primary-read-replica-con…
Browse files Browse the repository at this point in the history
…nection-connect
  • Loading branch information
greg0ire authored Apr 30, 2021
2 parents 1c2780d + 5df115c commit c925cd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private function isInitialized(): bool
}

if ($this->connection instanceof PrimaryReadReplicaConnection) {
$this->connection->connect('master');
$this->connection->ensureConnectedToPrimary();
}

return $this->schemaManager->tablesExist([$this->configuration->getTableName()]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ public function testPrimaryReadReplicaConnectionGetsConnected(): void
$connection = $this->createMock(PrimaryReadReplicaConnection::class);
$connection
->expects(self::atLeastOnce())
->method('connect')
->with('master');
->method('ensureConnectedToPrimary');

$connection
->expects(self::atLeastOnce())
Expand Down

0 comments on commit c925cd5

Please sign in to comment.