Skip to content

Commit a6aa3cc

Browse files
committed
Use default argument for server selection (which defaults to primary)
1 parent 2c549c8 commit a6aa3cc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/TransactionTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use Illuminate\Support\Facades\DB;
44
use Jenssegers\Mongodb\Eloquent\Model;
55
use MongoDB\BSON\ObjectId;
6-
use MongoDB\Driver\ReadPreference;
76
use MongoDB\Driver\Server;
87

98
class TransactionTest extends TestCase
@@ -425,6 +424,6 @@ public function testRollBackWithoutSession(): void
425424

426425
private function getPrimaryServerType(): int
427426
{
428-
return DB::getMongoClient()->getManager()->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY))->getType();
427+
return DB::getMongoClient()->getManager()->selectServer()->getType();
429428
}
430429
}

0 commit comments

Comments
 (0)