Skip to content

Commit 4a8a55a

Browse files
committed
Merge pull request #960
2 parents 1432286 + aa84f14 commit 4a8a55a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/retryable-writes/retryable-writes-004.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Retryable writes: unacknowledged write operations do not include transaction IDs
3-
--XFAIL--
4-
Depends on CDRIVER-2432
53
--SKIPIF--
64
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
75
<?php skip_if_not_libmongoc_crypto(); ?>
@@ -57,14 +55,16 @@ $bulk = new MongoDB\Driver\BulkWrite;
5755
$bulk->update(['x' => 1], ['$inc' => ['x' => 1]]);
5856
$manager->executeBulkWrite(NS, $bulk, ['writeConcern' => $writeConcern]);
5957

58+
/* Note: the server does not actually support unacknowledged write concerns for
59+
* findAndModify. This is just testing that mongoc_cmd_parts_set_write_concern()
60+
* in libmongoc detects w:0 and refrains from adding a transaction ID. */
6061
echo "\nTesting unacknowledged findAndModify\n";
6162
$command = new MongoDB\Driver\Command([
6263
'findAndModify' => COLLECTION_NAME,
6364
'query' => ['x' => 1],
6465
'update' => ['$inc' => ['x' => 1]],
65-
'writeConcern' => $writeConcern,
6666
]);
67-
$manager->executeReadWriteCommand(DATABASE_NAME, $command);
67+
$manager->executeReadWriteCommand(DATABASE_NAME, $command, ['writeConcern' => $writeConcern]);
6868

6969
MongoDB\Driver\Monitoring\removeSubscriber($observer);
7070

0 commit comments

Comments
 (0)