-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Ensure findOne does not set batchSize=1 #1659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
31d977b
add crud/findOne.json unified spec
NathanQingyangXu 6277518
add comment to explain collection's findOne() method was emulated
NathanQingyangXu 8a20064
add language enum and skip `findOne` unified test for `driver-kotlin-…
NathanQingyangXu 09ce444
Update driver-sync/src/test/functional/com/mongodb/client/unified/Uni…
NathanQingyangXu 7982c75
move Language enum to better location; removed SCALA enum entry
NathanQingyangXu 1f4e075
Merge remote-tracking branch 'origin/JAVA-5666' into JAVA-5666
NathanQingyangXu 66bf492
add ticket reference to UnifiedTestModifications
NathanQingyangXu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
158 changes: 158 additions & 0 deletions
158
driver-core/src/test/resources/unified-test-format/crud/findOne.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,158 @@ | ||
| { | ||
| "description": "findOne", | ||
| "schemaVersion": "1.0", | ||
| "createEntities": [ | ||
| { | ||
| "client": { | ||
| "id": "client0", | ||
| "observeEvents": [ | ||
| "commandStartedEvent" | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| "database": { | ||
| "id": "database0", | ||
| "client": "client0", | ||
| "databaseName": "find-tests" | ||
| } | ||
| }, | ||
| { | ||
| "collection": { | ||
| "id": "collection0", | ||
| "database": "database0", | ||
| "collectionName": "coll0" | ||
| } | ||
| } | ||
| ], | ||
| "initialData": [ | ||
| { | ||
| "collectionName": "coll0", | ||
| "databaseName": "find-tests", | ||
| "documents": [ | ||
| { | ||
| "_id": 1, | ||
| "x": 11 | ||
| }, | ||
| { | ||
| "_id": 2, | ||
| "x": 22 | ||
| }, | ||
| { | ||
| "_id": 3, | ||
| "x": 33 | ||
| }, | ||
| { | ||
| "_id": 4, | ||
| "x": 44 | ||
| }, | ||
| { | ||
| "_id": 5, | ||
| "x": 55 | ||
| }, | ||
| { | ||
| "_id": 6, | ||
| "x": 66 | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "tests": [ | ||
| { | ||
| "description": "FindOne with filter", | ||
| "operations": [ | ||
| { | ||
| "object": "collection0", | ||
| "name": "findOne", | ||
| "arguments": { | ||
| "filter": { | ||
| "_id": 1 | ||
| } | ||
| }, | ||
| "expectResult": { | ||
| "_id": 1, | ||
| "x": 11 | ||
| } | ||
| } | ||
| ], | ||
| "expectEvents": [ | ||
| { | ||
| "client": "client0", | ||
| "events": [ | ||
| { | ||
| "commandStartedEvent": { | ||
| "command": { | ||
| "find": "coll0", | ||
| "filter": { | ||
| "_id": 1 | ||
| }, | ||
| "batchSize": { | ||
| "$$exists": false | ||
| }, | ||
| "limit": 1, | ||
| "singleBatch": true | ||
| }, | ||
| "commandName": "find", | ||
| "databaseName": "find-tests" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "description": "FindOne with filter, sort, and skip", | ||
| "operations": [ | ||
| { | ||
| "object": "collection0", | ||
| "name": "findOne", | ||
| "arguments": { | ||
| "filter": { | ||
| "_id": { | ||
| "$gt": 2 | ||
| } | ||
| }, | ||
| "sort": { | ||
| "_id": 1 | ||
| }, | ||
| "skip": 2 | ||
| }, | ||
| "expectResult": { | ||
| "_id": 5, | ||
| "x": 55 | ||
| } | ||
| } | ||
| ], | ||
| "expectEvents": [ | ||
| { | ||
| "client": "client0", | ||
| "events": [ | ||
| { | ||
| "commandStartedEvent": { | ||
| "command": { | ||
| "find": "coll0", | ||
| "filter": { | ||
| "_id": { | ||
| "$gt": 2 | ||
| } | ||
| }, | ||
| "sort": { | ||
| "_id": 1 | ||
| }, | ||
| "skip": 2, | ||
| "batchSize": { | ||
| "$$exists": false | ||
| }, | ||
| "limit": 1, | ||
| "singleBatch": true | ||
| }, | ||
| "commandName": "find", | ||
| "databaseName": "find-tests" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.