forked from mongodb/mongo-php-library
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PHPLIB-1404: Sync retryable reads spec tests
Synced with mongodb/specifications#1536
- Loading branch information
Showing
43 changed files
with
24,672 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
143 changes: 143 additions & 0 deletions
143
tests/UnifiedSpecTests/retryable-reads/aggregate-merge.json
This file contains 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,143 @@ | ||
{ | ||
"description": "aggregate-merge", | ||
"schemaVersion": "1.0", | ||
"runOnRequirements": [ | ||
{ | ||
"minServerVersion": "4.1.11" | ||
} | ||
], | ||
"createEntities": [ | ||
{ | ||
"client": { | ||
"id": "client0", | ||
"useMultipleMongoses": false, | ||
"observeEvents": [ | ||
"commandStartedEvent" | ||
] | ||
} | ||
}, | ||
{ | ||
"database": { | ||
"id": "database0", | ||
"client": "client0", | ||
"databaseName": "retryable-reads-tests" | ||
} | ||
}, | ||
{ | ||
"collection": { | ||
"id": "collection0", | ||
"database": "database0", | ||
"collectionName": "coll" | ||
} | ||
} | ||
], | ||
"initialData": [ | ||
{ | ||
"collectionName": "coll", | ||
"databaseName": "retryable-reads-tests", | ||
"documents": [ | ||
{ | ||
"_id": 1, | ||
"x": 11 | ||
}, | ||
{ | ||
"_id": 2, | ||
"x": 22 | ||
}, | ||
{ | ||
"_id": 3, | ||
"x": 33 | ||
} | ||
] | ||
} | ||
], | ||
"tests": [ | ||
{ | ||
"description": "Aggregate with $merge does not retry", | ||
"operations": [ | ||
{ | ||
"object": "testRunner", | ||
"name": "failPoint", | ||
"arguments": { | ||
"client": "client0", | ||
"failPoint": { | ||
"configureFailPoint": "failCommand", | ||
"mode": { | ||
"times": 1 | ||
}, | ||
"data": { | ||
"failCommands": [ | ||
"aggregate" | ||
], | ||
"closeConnection": true | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"object": "collection0", | ||
"name": "aggregate", | ||
"arguments": { | ||
"pipeline": [ | ||
{ | ||
"$match": { | ||
"_id": { | ||
"$gt": 1 | ||
} | ||
} | ||
}, | ||
{ | ||
"$sort": { | ||
"x": 1 | ||
} | ||
}, | ||
{ | ||
"$merge": { | ||
"into": "output-collection" | ||
} | ||
} | ||
] | ||
}, | ||
"expectError": { | ||
"isError": true | ||
} | ||
} | ||
], | ||
"expectEvents": [ | ||
{ | ||
"client": "client0", | ||
"events": [ | ||
{ | ||
"commandStartedEvent": { | ||
"command": { | ||
"aggregate": "coll", | ||
"pipeline": [ | ||
{ | ||
"$match": { | ||
"_id": { | ||
"$gt": 1 | ||
} | ||
} | ||
}, | ||
{ | ||
"$sort": { | ||
"x": 1 | ||
} | ||
}, | ||
{ | ||
"$merge": { | ||
"into": "output-collection" | ||
} | ||
} | ||
] | ||
}, | ||
"commandName": "aggregate", | ||
"databaseName": "retryable-reads-tests" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.