Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
mongo-php-library
Commits
b72b6c0d
Unverified
Commit
b72b6c0d
authored
Mar 30, 2020
by
Andreas Braun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PHPLIB-539: Sync CRUD spec tests
parent
f6727da7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
5274 additions
and
3 deletions
+5274
-3
Delete.php
src/Operation/Delete.php
+5
-2
CrudSpecTest.php
tests/SpecTests/CrudSpecTest.php
+1
-1
bulkWrite-delete-hint-clientError.json
tests/SpecTests/crud/bulkWrite-delete-hint-clientError.json
+150
-0
bulkWrite-delete-hint-serverError.json
tests/SpecTests/crud/bulkWrite-delete-hint-serverError.json
+209
-0
bulkWrite-delete-hint.json
tests/SpecTests/crud/bulkWrite-delete-hint.json
+204
-0
bulkWrite-update-hint-clientError.json
tests/SpecTests/crud/bulkWrite-update-hint-clientError.json
+235
-0
bulkWrite-update-hint-serverError.json
tests/SpecTests/crud/bulkWrite-update-hint-serverError.json
+343
-0
deleteMany-hint-clientError.json
tests/SpecTests/crud/deleteMany-hint-clientError.json
+100
-0
deleteMany-hint-serverError.json
tests/SpecTests/crud/deleteMany-hint-serverError.json
+141
-0
deleteMany-hint.json
tests/SpecTests/crud/deleteMany-hint.json
+128
-0
deleteOne-hint-clientError.json
tests/SpecTests/crud/deleteOne-hint-clientError.json
+84
-0
deleteOne-hint-serverError.json
tests/SpecTests/crud/deleteOne-hint-serverError.json
+121
-0
deleteOne-hint.json
tests/SpecTests/crud/deleteOne-hint.json
+116
-0
findOneAndDelete-hint-clientError.json
tests/SpecTests/crud/findOneAndDelete-hint-clientError.json
+84
-0
findOneAndDelete-hint-serverError.json
tests/SpecTests/crud/findOneAndDelete-hint-serverError.json
+113
-0
findOneAndDelete-hint.json
tests/SpecTests/crud/findOneAndDelete-hint.json
+110
-0
unacknowledged-bulkWrite-delete-hint-clientError.json
...rud/unacknowledged-bulkWrite-delete-hint-clientError.json
+160
-0
unacknowledged-bulkWrite-delete-hint.json
.../SpecTests/crud/unacknowledged-bulkWrite-delete-hint.json
+174
-0
unacknowledged-bulkWrite-update-hint-clientError.json
...rud/unacknowledged-bulkWrite-update-hint-clientError.json
+250
-0
unacknowledged-bulkWrite-update-hint.json
.../SpecTests/crud/unacknowledged-bulkWrite-update-hint.json
+291
-0
unacknowledged-deleteMany-hint-clientError.json
...ests/crud/unacknowledged-deleteMany-hint-clientError.json
+110
-0
unacknowledged-deleteMany-hint.json
tests/SpecTests/crud/unacknowledged-deleteMany-hint.json
+114
-0
unacknowledged-deleteOne-hint-clientError.json
...Tests/crud/unacknowledged-deleteOne-hint-clientError.json
+94
-0
unacknowledged-deleteOne-hint.json
tests/SpecTests/crud/unacknowledged-deleteOne-hint.json
+102
-0
unacknowledged-findOneAndDelete-hint-clientError.json
...rud/unacknowledged-findOneAndDelete-hint-clientError.json
+94
-0
unacknowledged-findOneAndDelete-hint.json
.../SpecTests/crud/unacknowledged-findOneAndDelete-hint.json
+94
-0
unacknowledged-findOneAndReplace-hint-clientError.json
...ud/unacknowledged-findOneAndReplace-hint-clientError.json
+100
-0
unacknowledged-findOneAndReplace-hint.json
...SpecTests/crud/unacknowledged-findOneAndReplace-hint.json
+101
-0
unacknowledged-findOneAndUpdate-hint-clientError.json
...rud/unacknowledged-findOneAndUpdate-hint-clientError.json
+104
-0
unacknowledged-findOneAndUpdate-hint.json
.../SpecTests/crud/unacknowledged-findOneAndUpdate-hint.json
+112
-0
unacknowledged-replaceOne-hint-clientError.json
...ests/crud/unacknowledged-replaceOne-hint-clientError.json
+104
-0
unacknowledged-replaceOne-hint.json
tests/SpecTests/crud/unacknowledged-replaceOne-hint.json
+120
-0
unacknowledged-updateMany-hint-clientError.json
...ests/crud/unacknowledged-updateMany-hint-clientError.json
+120
-0
unacknowledged-updateMany-hint.json
tests/SpecTests/crud/unacknowledged-updateMany-hint.json
+134
-0
unacknowledged-updateOne-hint-clientError.json
...Tests/crud/unacknowledged-updateOne-hint-clientError.json
+108
-0
unacknowledged-updateOne-hint.json
tests/SpecTests/crud/unacknowledged-updateOne-hint.json
+128
-0
updateMany-hint-clientError.json
tests/SpecTests/crud/updateMany-hint-clientError.json
+110
-0
updateMany-hint-serverError.json
tests/SpecTests/crud/updateMany-hint-serverError.json
+161
-0
updateOne-hint-clientError.json
tests/SpecTests/crud/updateOne-hint-clientError.json
+98
-0
updateOne-hint-serverError.json
tests/SpecTests/crud/updateOne-hint-serverError.json
+147
-0
No files found.
src/Operation/Delete.php
View file @
b72b6c0d
...
...
@@ -45,7 +45,7 @@ class Delete implements Executable, Explainable
private
static
$wireVersionForCollation
=
5
;
/** @var int */
private
static
$wireVersionForHint
=
9
;
private
static
$wireVersionForHint
ServerSideError
=
5
;
/** @var string */
private
$databaseName
;
...
...
@@ -145,7 +145,10 @@ class Delete implements Executable, Explainable
throw
UnsupportedException
::
collationNotSupported
();
}
if
(
isset
(
$this
->
options
[
'hint'
])
&&
!
server_supports_feature
(
$server
,
self
::
$wireVersionForHint
))
{
/* Server versions >= 3.4.0 raise errors for unknown update
* options. For previous versions, the CRUD spec requires a client-side
* error. */
if
(
isset
(
$this
->
options
[
'hint'
])
&&
!
server_supports_feature
(
$server
,
self
::
$wireVersionForHintServerSideError
))
{
throw
UnsupportedException
::
hintNotSupported
();
}
...
...
tests/SpecTests/CrudSpecTest.php
View file @
b72b6c0d
...
...
@@ -73,7 +73,7 @@ class CrudSpecTest extends FunctionalTestCase
}
if
(
isset
(
$test
->
expectations
))
{
$commandExpectations
=
CommandExpectations
::
fromCrud
(
$test
->
expectations
);
$commandExpectations
=
CommandExpectations
::
fromCrud
(
(
array
)
$test
->
expectations
);
$commandExpectations
->
startMonitoring
();
}
...
...
tests/SpecTests/crud/bulkWrite-delete-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"3.3.99"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
],
"collection_name"
:
"BulkWrite_delete_hint"
,
"tests"
:
[
{
"description"
:
"BulkWrite deleteOne with hints unsupported (client-side error)"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"arguments"
:
{
"requests"
:
[
{
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
}
},
{
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
2
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
},
{
"description"
:
"BulkWrite deleteMany with hints unsupported (client-side error)"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"arguments"
:
{
"requests"
:
[
{
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"hint"
:
"_id_"
}
},
{
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gte"
:
4
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
}
]
}
tests/SpecTests/crud/bulkWrite-delete-hint-serverError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"3.4.0"
,
"maxServerVersion"
:
"4.3.3"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
],
"collection_name"
:
"BulkWrite_delete_hint"
,
"tests"
:
[
{
"description"
:
"BulkWrite deleteOne with hints unsupported (server-side error)"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"arguments"
:
{
"requests"
:
[
{
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
}
},
{
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
2
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"BulkWrite_delete_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
,
"limit"
:
1
},
{
"q"
:
{
"_id"
:
2
},
"hint"
:
{
"_id"
:
1
},
"limit"
:
1
}
],
"ordered"
:
true
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
},
{
"description"
:
"BulkWrite deleteMany with hints unsupported (server-side error)"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"arguments"
:
{
"requests"
:
[
{
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"hint"
:
"_id_"
}
},
{
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gte"
:
4
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"BulkWrite_delete_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"hint"
:
"_id_"
,
"limit"
:
0
},
{
"q"
:
{
"_id"
:
{
"$gte"
:
4
}
},
"hint"
:
{
"_id"
:
1
},
"limit"
:
0
}
],
"ordered"
:
true
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
}
]
}
tests/SpecTests/crud/bulkWrite-delete-hint.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.3.4"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
],
"collection_name"
:
"BulkWrite_delete_hint"
,
"tests"
:
[
{
"description"
:
"BulkWrite deleteOne with hints"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"arguments"
:
{
"requests"
:
[
{
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
}
},
{
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
2
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"result"
:
{
"deletedCount"
:
2
,
"insertedCount"
:
0
,
"insertedIds"
:
{},
"matchedCount"
:
0
,
"modifiedCount"
:
0
,
"upsertedCount"
:
0
,
"upsertedIds"
:
{}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"BulkWrite_delete_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
,
"limit"
:
1
},
{
"q"
:
{
"_id"
:
2
},
"hint"
:
{
"_id"
:
1
},
"limit"
:
1
}
],
"ordered"
:
true
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
},
{
"description"
:
"BulkWrite deleteMany with hints"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"arguments"
:
{
"requests"
:
[
{
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"hint"
:
"_id_"
}
},
{
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gte"
:
4
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"result"
:
{
"deletedCount"
:
3
,
"insertedCount"
:
0
,
"insertedIds"
:
{},
"matchedCount"
:
0
,
"modifiedCount"
:
0
,
"upsertedCount"
:
0
,
"upsertedIds"
:
{}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"BulkWrite_delete_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"hint"
:
"_id_"
,
"limit"
:
0
},
{
"q"
:
{
"_id"
:
{
"$gte"
:
4
}
},
"hint"
:
{
"_id"
:
1
},
"limit"
:
0
}
],
"ordered"
:
true
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
3
,
"x"
:
33
}
]
}
}
}
]
}
tests/SpecTests/crud/bulkWrite-update-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"3.3.99"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
],
"collection_name"
:
"test_bulkwrite_update_hint"
,
"tests"
:
[
{
"description"
:
"BulkWrite updateOne with update hints unsupported (client-side error)"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"arguments"
:
{
"requests"
:
[
{
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
}
},
{
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
},
{
"description"
:
"BulkWrite updateMany with update hints unsupported (client-side error)"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"arguments"
:
{
"requests"
:
[
{
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
}
},
{
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
},
{
"description"
:
"BulkWrite replaceOne with update hints unsupported (client-side error)"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"arguments"
:
{
"requests"
:
[
{
"name"
:
"replaceOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
3
},
"replacement"
:
{
"x"
:
333
},
"hint"
:
"_id_"
}
},
{
"name"
:
"replaceOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
4
},
"replacement"
:
{
"x"
:
444
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
}
]
}
tests/SpecTests/crud/bulkWrite-update-hint-serverError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"3.4.0"
,
"maxServerVersion"
:
"4.1.9"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
],
"collection_name"
:
"test_bulkwrite_update_hint"
,
"tests"
:
[
{
"description"
:
"BulkWrite updateOne with update hints unsupported (server-side error)"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"arguments"
:
{
"requests"
:
[
{
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
}
},
{
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"update"
:
"test_bulkwrite_update_hint"
,
"updates"
:
[
{
"q"
:
{
"_id"
:
1
},
"u"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
},
{
"q"
:
{
"_id"
:
1
},
"u"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
],
"ordered"
:
true
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
},
{
"description"
:
"BulkWrite updateMany with update hints unsupported (server-side error)"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"arguments"
:
{
"requests"
:
[
{
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
}
},
{
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"update"
:
"test_bulkwrite_update_hint"
,
"updates"
:
[
{
"q"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"u"
:
{
"$inc"
:
{
"x"
:
1
}
},
"multi"
:
true
,
"hint"
:
"_id_"
},
{
"q"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"u"
:
{
"$inc"
:
{
"x"
:
1
}
},
"multi"
:
true
,
"hint"
:
{
"_id"
:
1
}
}
],
"ordered"
:
true
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
},
{
"description"
:
"BulkWrite replaceOne with update hints unsupported (server-side error)"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"arguments"
:
{
"requests"
:
[
{
"name"
:
"replaceOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
3
},
"replacement"
:
{
"x"
:
333
},
"hint"
:
"_id_"
}
},
{
"name"
:
"replaceOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
4
},
"replacement"
:
{
"x"
:
444
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"update"
:
"test_bulkwrite_update_hint"
,
"updates"
:
[
{
"q"
:
{
"_id"
:
3
},
"u"
:
{
"x"
:
333
},
"hint"
:
"_id_"
},
{
"q"
:
{
"_id"
:
4
},
"u"
:
{
"x"
:
444
},
"hint"
:
{
"_id"
:
1
}
}
],
"ordered"
:
true
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
}
]
}
tests/SpecTests/crud/deleteMany-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"3.3.99"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
],
"collection_name"
:
"DeleteMany_hint"
,
"tests"
:
[
{
"description"
:
"DeleteMany with hint string unsupported (client-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
]
}
}
},
{
"description"
:
"DeleteMany with hint document unsupported (client-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
]
}
}
}
]
}
tests/SpecTests/crud/deleteMany-hint-serverError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"3.4.0"
,
"maxServerVersion"
:
"4.3.3"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
],
"collection_name"
:
"DeleteMany_hint"
,
"tests"
:
[
{
"description"
:
"DeleteMany with hint string unsupported (server-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"DeleteMany_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
"_id_"
,
"limit"
:
0
}
]
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
]
}
}
},
{
"description"
:
"DeleteMany with hint document unsupported (server-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"DeleteMany_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
{
"_id"
:
1
},
"limit"
:
0
}
]
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
]
}
}
}
]
}
tests/SpecTests/crud/deleteMany-hint.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.3.4"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
],
"collection_name"
:
"DeleteMany_hint"
,
"tests"
:
[
{
"description"
:
"DeleteMany with hint string"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
"_id_"
},
"result"
:
{
"deletedCount"
:
2
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"DeleteMany_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
"_id_"
,
"limit"
:
0
}
]
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
}
]
}
}
},
{
"description"
:
"DeleteMany with hint document"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
},
"result"
:
{
"deletedCount"
:
2
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"DeleteMany_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
{
"_id"
:
1
},
"limit"
:
0
}
]
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
}
]
}
}
}
]
}
tests/SpecTests/crud/deleteOne-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"3.3.99"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"DeleteOne_hint"
,
"tests"
:
[
{
"description"
:
"DeleteOne with hint string unsupported (client-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
},
{
"description"
:
"DeleteOne with hint document unsupported (client-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
}
]
}
tests/SpecTests/crud/deleteOne-hint-serverError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"3.4.0"
,
"maxServerVersion"
:
"4.3.3"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"DeleteOne_hint"
,
"tests"
:
[
{
"description"
:
"DeleteOne with hint string unsupported (server-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"DeleteOne_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
,
"limit"
:
1
}
]
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
},
{
"description"
:
"DeleteOne with hint document unsupported (server-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"DeleteOne_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
},
"limit"
:
1
}
]
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
}
]
}
tests/SpecTests/crud/deleteOne-hint.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.3.4"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"DeleteOne_hint"
,
"tests"
:
[
{
"description"
:
"DeleteOne with hint string"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
},
"result"
:
{
"deletedCount"
:
1
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"DeleteOne_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
,
"limit"
:
1
}
]
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
},
{
"description"
:
"deleteOne with hint document"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
}
},
"result"
:
{
"deletedCount"
:
1
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"DeleteOne_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
},
"limit"
:
1
}
]
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
}
]
}
tests/SpecTests/crud/findOneAndDelete-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"4.0.99"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"findOneAndDelete_hint"
,
"tests"
:
[
{
"description"
:
"FindOneAndDelete with hint string unsupported (client-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"findOneAndDelete"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
},
{
"description"
:
"FindOneAndDelete with hint document"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"findOneAndDelete"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
}
]
}
tests/SpecTests/crud/findOneAndDelete-hint-serverError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.2.0"
,
"maxServerVersion"
:
"4.3.3"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"findOneAndDelete_hint"
,
"tests"
:
[
{
"description"
:
"FindOneAndDelete with hint string unsupported (server-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"findOneAndDelete"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"findAndModify"
:
"findOneAndDelete_hint"
,
"query"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
,
"remove"
:
true
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
},
{
"description"
:
"FindOneAndDelete with hint document unsupported (server-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"findOneAndDelete"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"findAndModify"
:
"findOneAndDelete_hint"
,
"query"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
},
"remove"
:
true
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
}
]
}
tests/SpecTests/crud/findOneAndDelete-hint.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.3.4"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"findOneAndDelete_hint"
,
"tests"
:
[
{
"description"
:
"FindOneAndDelete with hint string"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"findOneAndDelete"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
},
"result"
:
{
"_id"
:
1
,
"x"
:
11
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"findAndModify"
:
"findOneAndDelete_hint"
,
"query"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
,
"remove"
:
true
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
},
{
"description"
:
"FindOneAndDelete with hint document"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"findOneAndDelete"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
}
},
"result"
:
{
"_id"
:
1
,
"x"
:
11
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"findAndModify"
:
"findOneAndDelete_hint"
,
"query"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
},
"remove"
:
true
}
}
}
],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
}
]
}
tests/SpecTests/crud/unacknowledged-bulkWrite-delete-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"4.3.3"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
],
"collection_name"
:
"BulkWrite_delete_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged bulkWrite deleteOne with hints fails with client-side error on server < 4.4"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"arguments"
:
{
"requests"
:
[
{
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
}
},
{
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
2
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
},
{
"description"
:
"Unacknowledged bulkWrite deleteMany with hints fails with client-side error on server < 4.4"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"arguments"
:
{
"requests"
:
[
{
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"hint"
:
"_id_"
}
},
{
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gte"
:
4
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
}
]
}
tests/SpecTests/crud/unacknowledged-bulkWrite-delete-hint.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.3.4"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
],
"collection_name"
:
"BulkWrite_delete_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged bulkWrite deleteOne with hints succeeds on server >= 4.4"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"arguments"
:
{
"requests"
:
[
{
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
}
},
{
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
2
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"BulkWrite_delete_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
,
"limit"
:
1
},
{
"q"
:
{
"_id"
:
2
},
"hint"
:
{
"_id"
:
1
},
"limit"
:
1
}
],
"ordered"
:
true
}
}
}
],
"outcome"
:
{}
},
{
"description"
:
"Unacknowledged bulkWrite deleteMany with hints succeeds on server >= 4.4"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"arguments"
:
{
"requests"
:
[
{
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"hint"
:
"_id_"
}
},
{
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gte"
:
4
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"BulkWrite_delete_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"hint"
:
"_id_"
,
"limit"
:
0
},
{
"q"
:
{
"_id"
:
{
"$gte"
:
4
}
},
"hint"
:
{
"_id"
:
1
},
"limit"
:
0
}
],
"ordered"
:
true
}
}
}
],
"outcome"
:
{}
}
]
}
tests/SpecTests/crud/unacknowledged-bulkWrite-update-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"4.1.9"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
],
"collection_name"
:
"Bulkwrite_update_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged bulkWrite updateOne with hints fails with client-side error on server < 4.2"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"arguments"
:
{
"requests"
:
[
{
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
}
},
{
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
},
{
"description"
:
"Unacknowledged bulkWrite updateMany with hints fails with client-side error on server < 4.2"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"arguments"
:
{
"requests"
:
[
{
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
}
},
{
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
},
{
"description"
:
"Unacknowledged bulkWrite replaceOne with hints unsupported (client-side error)"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"arguments"
:
{
"requests"
:
[
{
"name"
:
"replaceOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
3
},
"replacement"
:
{
"x"
:
333
},
"hint"
:
"_id_"
}
},
{
"name"
:
"replaceOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
4
},
"replacement"
:
{
"x"
:
444
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
]
}
}
}
]
}
tests/SpecTests/crud/unacknowledged-bulkWrite-update-hint.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.2.0"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
},
{
"_id"
:
4
,
"x"
:
44
}
],
"collection_name"
:
"BulkWrite_update_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged bulkWrite updateOne with update hint succeeds on server >= 4.2"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"arguments"
:
{
"requests"
:
[
{
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
}
},
{
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"update"
:
"BulkWrite_update_hint"
,
"updates"
:
[
{
"q"
:
{
"_id"
:
1
},
"u"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
},
{
"q"
:
{
"_id"
:
1
},
"u"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
],
"ordered"
:
true
}
}
}
],
"outcome"
:
{}
},
{
"description"
:
"Unacknowledged bulkWrite updateMany with update hint succeeds on server >= 4.2"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"arguments"
:
{
"requests"
:
[
{
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
}
},
{
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"update"
:
"BulkWrite_update_hint"
,
"updates"
:
[
{
"q"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"u"
:
{
"$inc"
:
{
"x"
:
1
}
},
"multi"
:
true
,
"hint"
:
"_id_"
},
{
"q"
:
{
"_id"
:
{
"$lt"
:
3
}
},
"u"
:
{
"$inc"
:
{
"x"
:
1
}
},
"multi"
:
true
,
"hint"
:
{
"_id"
:
1
}
}
],
"ordered"
:
true
}
}
}
],
"outcome"
:
{}
},
{
"description"
:
"Unacknowledged bulkWrite replaceOne with update hints"
,
"operations"
:
[
{
"name"
:
"bulkWrite"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"arguments"
:
{
"requests"
:
[
{
"name"
:
"replaceOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
3
},
"replacement"
:
{
"x"
:
333
},
"hint"
:
"_id_"
}
},
{
"name"
:
"replaceOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
4
},
"replacement"
:
{
"x"
:
444
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"options"
:
{
"ordered"
:
true
}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"update"
:
"BulkWrite_update_hint"
,
"updates"
:
[
{
"q"
:
{
"_id"
:
3
},
"u"
:
{
"x"
:
333
},
"hint"
:
"_id_"
},
{
"q"
:
{
"_id"
:
4
},
"u"
:
{
"x"
:
444
},
"hint"
:
{
"_id"
:
1
}
}
],
"ordered"
:
true
}
}
}
],
"outcome"
:
{}
}
]
}
tests/SpecTests/crud/unacknowledged-deleteMany-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"4.3.3"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
],
"collection_name"
:
"DeleteMany_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged deleteMany with hint string fails with client-side error on server < 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
]
}
}
},
{
"description"
:
"Unacknowledged deleteMany with hint document fails with client-side error on server < 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
]
}
}
}
]
}
tests/SpecTests/crud/unacknowledged-deleteMany-hint.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.3.4"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
],
"collection_name"
:
"DeleteMany_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged deleteMany with hint string succeeds on server >= 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
"_id_"
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"DeleteMany_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
"_id_"
,
"limit"
:
0
}
]
}
}
}
],
"outcome"
:
{}
},
{
"description"
:
"Unacknowledged deleteMany with hint document succeeds on server >= 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"DeleteMany_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"hint"
:
{
"_id"
:
1
},
"limit"
:
0
}
]
}
}
}
],
"outcome"
:
{}
}
]
}
tests/SpecTests/crud/unacknowledged-deleteOne-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"4.3.3"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"DeleteOne_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged deleteOne with hint string fails with client-side error on server < 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
},
{
"description"
:
"Unacknowledged deleteOne with hint document fails with client-side error on server < 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
}
]
}
tests/SpecTests/crud/unacknowledged-deleteOne-hint.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.3.4"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"DeleteOne_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged deleteOne with hint string succeeds on server >= 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"DeleteOne_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
,
"limit"
:
1
}
]
}
}
}
],
"outcome"
:
{}
},
{
"description"
:
"Unacknowledged deleteOne with hint document succeeds on server >= 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"delete"
:
"DeleteOne_hint"
,
"deletes"
:
[
{
"q"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
},
"limit"
:
1
}
]
}
}
}
],
"outcome"
:
{}
}
]
}
tests/SpecTests/crud/unacknowledged-findOneAndDelete-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"4.3.3"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"findOneAndDelete_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged findOneAndDelete with hint string fails with client-side error on server < 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"findOneAndDelete"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
},
{
"description"
:
"Unacknowledged findOneAndDelete with hint document fails with client-side error on server < 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"findOneAndDelete"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
}
]
}
tests/SpecTests/crud/unacknowledged-findOneAndDelete-hint.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.3.4"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"findOneAndDelete_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged findOneAndDelete with hint string succeeds on server >= 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"findOneAndDelete"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"findAndModify"
:
"findOneAndDelete_hint"
,
"query"
:
{
"_id"
:
1
},
"hint"
:
"_id_"
,
"remove"
:
true
}
}
}
],
"outcome"
:
{}
},
{
"description"
:
"Unacknowledged findOneAndDelete with hint document succeeds on server >= 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"findOneAndDelete"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"findAndModify"
:
"findOneAndDelete_hint"
,
"query"
:
{
"_id"
:
1
},
"hint"
:
{
"_id"
:
1
},
"remove"
:
true
}
}
}
],
"outcome"
:
{}
}
]
}
tests/SpecTests/crud/unacknowledged-findOneAndReplace-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"4.3.3"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"FindOneAndReplace_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged findOneAndReplace with hint string fails with client-side error on server < 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"findOneAndReplace"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"replacement"
:
{
"x"
:
33
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
},
{
"description"
:
"Unacknowledged findOneAndReplace with hint document fails with client-side error on server < 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"findOneAndReplace"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"replacement"
:
{
"x"
:
33
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
}
]
}
tests/SpecTests/crud/unacknowledged-findOneAndReplace-hint.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.3.4"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"FindOneAndReplace_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged findOneAndReplace with hint string succeeds on server >= 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"findOneAndReplace"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"replacement"
:
{
"x"
:
33
},
"hint"
:
"_id_"
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"findAndModify"
:
"FindOneAndReplace_hint"
,
"query"
:
{
"_id"
:
1
},
"update"
:
{
"x"
:
33
},
"hint"
:
"_id_"
}
}
}
],
"outcome"
:
{}
},
{
"description"
:
"Unacknowledged findOneAndReplace with hint document succeeds on server >= 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"findOneAndReplace"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"replacement"
:
{
"x"
:
33
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"findAndModify"
:
"FindOneAndReplace_hint"
,
"query"
:
{
"_id"
:
1
},
"update"
:
{
"x"
:
33
}
}
}
}
],
"outcome"
:
{}
}
]
}
tests/SpecTests/crud/unacknowledged-findOneAndUpdate-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"4.3.3"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"FindOneAndUpdate_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged findOneAndUpdate with hint string fails with client-side error on server < 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"findOneAndUpdate"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
},
{
"description"
:
"Unacknowledged findOneAndUpdate with hint document fails with client-side error on server < 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"findOneAndUpdate"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
}
]
}
tests/SpecTests/crud/unacknowledged-findOneAndUpdate-hint.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.3.4"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"FindOneAndUpdate_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged findOneAndUpdate with hint string succeeds on server >= 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"findOneAndUpdate"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"findAndModify"
:
"FindOneAndUpdate_hint"
,
"query"
:
{
"_id"
:
1
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
}
}
}
],
"outcome"
:
{}
},
{
"description"
:
"Unacknowledged findOneAndUpdate with hint document succeeds on server >= 4.4"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"findOneAndUpdate"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
1
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"findAndModify"
:
"FindOneAndUpdate_hint"
,
"query"
:
{
"_id"
:
1
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
}
}
],
"outcome"
:
{}
}
]
}
tests/SpecTests/crud/unacknowledged-replaceOne-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"4.1.9"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"ReplaceOne_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged ReplaceOne with hint string fails with client-side error on server < 4.2"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"replaceOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"replacement"
:
{
"x"
:
111
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
},
{
"description"
:
"Unacknowledged ReplaceOne with hint document fails with client-side error on server < 4.2"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"replaceOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"replacement"
:
{
"x"
:
111
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
}
]
}
tests/SpecTests/crud/unacknowledged-replaceOne-hint.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.2.0"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"Replaceone_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged replaceOne with hint string succeeds on server >= 4.2"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"replaceOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"replacement"
:
{
"x"
:
111
},
"hint"
:
"_id_"
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"update"
:
"Replaceone_hint"
,
"updates"
:
[
{
"q"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"u"
:
{
"x"
:
111
},
"hint"
:
"_id_"
}
]
}
}
}
],
"outcome"
:
{}
},
{
"description"
:
"Unacknowledged replaceOne with hint document succeeds on server >= 4.2"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"replaceOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"replacement"
:
{
"x"
:
111
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"update"
:
"Replaceone_hint"
,
"updates"
:
[
{
"q"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"u"
:
{
"x"
:
111
},
"hint"
:
{
"_id"
:
1
}
}
]
}
}
}
],
"outcome"
:
{}
}
]
}
tests/SpecTests/crud/unacknowledged-updateMany-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"4.1.9"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
],
"collection_name"
:
"Updatemany_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged updateMany with hint string fails with client-side error on server < 4.2"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
]
}
}
},
{
"description"
:
"Unacknowledged updateMany with hint document fails with client-side error on server < 4.2"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
]
}
}
}
]
}
tests/SpecTests/crud/unacknowledged-updateMany-hint.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.2.0"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
],
"collection_name"
:
"UpdateMany_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged updateMany with hint string succeeds on server >= 4.2"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"update"
:
"UpdateMany_hint"
,
"updates"
:
[
{
"q"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"u"
:
{
"$inc"
:
{
"x"
:
1
}
},
"multi"
:
true
,
"hint"
:
"_id_"
}
]
}
}
}
],
"outcome"
:
{}
},
{
"description"
:
"Unacknowledged updateMany with hint document succeeds on server >= 4.2"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"update"
:
"UpdateMany_hint"
,
"updates"
:
[
{
"q"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"u"
:
{
"$inc"
:
{
"x"
:
1
}
},
"multi"
:
true
,
"hint"
:
{
"_id"
:
1
}
}
]
}
}
}
],
"outcome"
:
{}
}
]
}
tests/SpecTests/crud/unacknowledged-updateOne-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"4.1.9"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"Updateone_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged updateOne with hint string fails with client-side error on server < 4.2"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
},
{
"description"
:
"Unacknowledged updateOne with hint document fails with client-side error on server < 4.2"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
{},
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
}
]
}
tests/SpecTests/crud/unacknowledged-updateOne-hint.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"minServerVersion"
:
"4.2.0"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"updateone_hint"
,
"tests"
:
[
{
"description"
:
"Unacknowledged updateOne with hint string succeeds on server >= 4.2"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"update"
:
"updateone_hint"
,
"updates"
:
[
{
"q"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"u"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
}
]
}
}
}
],
"outcome"
:
{}
},
{
"description"
:
"Unacknowledged updateOne with hint document succeeds on server >= 4.2"
,
"operations"
:
[
{
"object"
:
"collection"
,
"collectionOptions"
:
{
"writeConcern"
:
{
"w"
:
0
}
},
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
}
],
"expectations"
:
[
{
"command_started_event"
:
{
"command"
:
{
"update"
:
"updateone_hint"
,
"updates"
:
[
{
"q"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"u"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
}
]
}
}
}
],
"outcome"
:
{}
}
]
}
tests/SpecTests/crud/updateMany-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"3.3.99"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
],
"collection_name"
:
"test_updatemany_hint"
,
"tests"
:
[
{
"description"
:
"UpdateMany with hint string unsupported (client-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
]
}
}
},
{
"description"
:
"UpdateMany with hint document unsupported (client-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
]
}
}
}
]
}
tests/SpecTests/crud/updateMany-hint-serverError.json
0 → 100644
View file @
b72b6c0d
This diff is collapsed.
Click to expand it.
tests/SpecTests/crud/updateOne-hint-clientError.json
0 → 100644
View file @
b72b6c0d
{
"runOn"
:
[
{
"maxServerVersion"
:
"3.3.99"
}
],
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
],
"collection_name"
:
"test_updateone_hint"
,
"tests"
:
[
{
"description"
:
"UpdateOne with hint string unsupported (client-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
"_id_"
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
},
{
"description"
:
"UpdateOne with hint document unsupported (client-side error)"
,
"operations"
:
[
{
"object"
:
"collection"
,
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"_id"
:
{
"$gt"
:
1
}
},
"update"
:
{
"$inc"
:
{
"x"
:
1
}
},
"hint"
:
{
"_id"
:
1
}
},
"error"
:
true
}
],
"expectations"
:
[],
"outcome"
:
{
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
}
]
}
}
}
]
}
tests/SpecTests/crud/updateOne-hint-serverError.json
0 → 100644
View file @
b72b6c0d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment