diff --git a/tests/framework/db/sqlite/ConnectionTest.php b/tests/framework/db/sqlite/ConnectionTest.php index 8a8e00f..07c28ab 100644 --- a/tests/framework/db/sqlite/ConnectionTest.php +++ b/tests/framework/db/sqlite/ConnectionTest.php @@ -117,6 +117,9 @@ class ConnectionTest extends \yiiunit\framework\db\ConnectionTest $hit_slaves[$db->getSlave()->dsn] = true; $hit_masters[$db->getMaster()->dsn] = true; + if (count($hit_slaves) === $slavesCount && count($hit_masters) === $mastersCount) { + break; + } } $this->assertCount($mastersCount, $hit_masters, 'all masters hit'); @@ -139,6 +142,9 @@ class ConnectionTest extends \yiiunit\framework\db\ConnectionTest $hit_slaves[$db->getSlave()->dsn] = true; $hit_masters[$db->getMaster()->dsn] = true; + if (count($hit_slaves) === $slavesCount) { + break; + } } $this->assertCount(1, $hit_masters, 'same master hit');