File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Retryable writes: unacknowledged write operations do not include transaction IDs
3
- --XFAIL--
4
- Depends on CDRIVER-2432
5
3
--SKIPIF--
6
4
<?php require __DIR__ . "/../utils/basic-skipif.inc " ; ?>
7
5
<?php skip_if_not_libmongoc_crypto (); ?>
@@ -57,14 +55,16 @@ $bulk = new MongoDB\Driver\BulkWrite;
57
55
$ bulk ->update (['x ' => 1 ], ['$inc ' => ['x ' => 1 ]]);
58
56
$ manager ->executeBulkWrite (NS , $ bulk , ['writeConcern ' => $ writeConcern ]);
59
57
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. */
60
61
echo "\nTesting unacknowledged findAndModify \n" ;
61
62
$ command = new MongoDB \Driver \Command ([
62
63
'findAndModify ' => COLLECTION_NAME ,
63
64
'query ' => ['x ' => 1 ],
64
65
'update ' => ['$inc ' => ['x ' => 1 ]],
65
- 'writeConcern ' => $ writeConcern ,
66
66
]);
67
- $ manager ->executeReadWriteCommand (DATABASE_NAME , $ command );
67
+ $ manager ->executeReadWriteCommand (DATABASE_NAME , $ command, [ ' writeConcern ' => $ writeConcern ] );
68
68
69
69
MongoDB \Driver \Monitoring \removeSubscriber ($ observer );
70
70
You can’t perform that action at this time.
0 commit comments