Skip to content

Commit b8bd32f

Browse files
committed
Use executeCommand for create in txn pinning tests
The previous inconsistency was likely the result of copypasta (especially where executeReadCommand was used). There is no issue with using executeCommand here since an explicit write concern is provided (nothing will be inherited).
1 parent bc73a1c commit b8bd32f

7 files changed

+7
-7
lines changed

tests/manager/manager-executeQuery-006.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require_once __DIR__ . "/../utils/basic.inc";
1212
$manager = new MongoDB\Driver\Manager(URI);
1313

1414
/* Create collections as that can't be (automatically) done in a transaction */
15-
$manager->executeReadWriteCommand(
15+
$manager->executeCommand(
1616
DATABASE_NAME,
1717
new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]),
1818
[ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ]

tests/manager/manager-executeReadCommand-002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require_once __DIR__ . "/../utils/basic.inc";
1212
$manager = new MongoDB\Driver\Manager(URI);
1313

1414
/* Create collections as that can't be (automatically) done in a transaction */
15-
$manager->executeReadCommand(
15+
$manager->executeCommand(
1616
DATABASE_NAME,
1717
new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]),
1818
[ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ]

tests/manager/manager-executeReadWriteCommand-002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require_once __DIR__ . "/../utils/basic.inc";
1212
$manager = new MongoDB\Driver\Manager(URI);
1313

1414
/* Create collections as that can't be (automatically) done in a transaction */
15-
$manager->executeReadWriteCommand(
15+
$manager->executeCommand(
1616
DATABASE_NAME,
1717
new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]),
1818
[ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ]

tests/manager/manager-executeWriteCommand-002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require_once __DIR__ . "/../utils/basic.inc";
1212
$manager = new MongoDB\Driver\Manager(URI);
1313

1414
/* Create collections as that can't be (automatically) done in a transaction */
15-
$manager->executeReadWriteCommand(
15+
$manager->executeCommand(
1616
DATABASE_NAME,
1717
new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]),
1818
[ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ]

tests/server/server-executeQuery-012.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require_once __DIR__ . "/../utils/basic.inc";
1212
$manager = new MongoDB\Driver\Manager(URI);
1313

1414
/* Create collections as that can't be (automatically) done in a transaction */
15-
$manager->executeReadWriteCommand(
15+
$manager->executeCommand(
1616
DATABASE_NAME,
1717
new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]),
1818
[ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ]

tests/server/server-executeReadCommand-002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require_once __DIR__ . "/../utils/basic.inc";
1212
$manager = new MongoDB\Driver\Manager(URI);
1313

1414
/* Create collections as that can't be (automatically) done in a transaction */
15-
$manager->executeReadCommand(
15+
$manager->executeCommand(
1616
DATABASE_NAME,
1717
new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]),
1818
[ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ]

tests/server/server-executeWriteCommand-002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require_once __DIR__ . "/../utils/basic.inc";
1212
$manager = new MongoDB\Driver\Manager(URI);
1313

1414
/* Create collections as that can't be (automatically) done in a transaction */
15-
$manager->executeReadWriteCommand(
15+
$manager->executeCommand(
1616
DATABASE_NAME,
1717
new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]),
1818
[ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ]

0 commit comments

Comments
 (0)