diff --git a/test/spec/client-side-operations-timeout/deprecated-options.json b/test/spec/client-side-operations-timeout/deprecated-options.json index d3e4631ff43..647e1bf792d 100644 --- a/test/spec/client-side-operations-timeout/deprecated-options.json +++ b/test/spec/client-side-operations-timeout/deprecated-options.json @@ -6750,16 +6750,23 @@ } } }, + { + "name": "createIndex", + "object": "collection", + "arguments": { + "keys": { + "x": 1 + }, + "timeoutMS": 100000, + "name": "x_1" + } + }, { "name": "dropIndex", "object": "collection", "arguments": { "timeoutMS": 100000, "name": "x_1" - }, - "expectError": { - "isClientError": false, - "isTimeoutError": false } } ] @@ -6815,16 +6822,23 @@ ] } }, + { + "name": "createIndex", + "object": "collection", + "arguments": { + "keys": { + "x": 1 + }, + "timeoutMS": 100000, + "name": "x_1" + } + }, { "name": "dropIndex", "object": "collection", "arguments": { "timeoutMS": 100000, "name": "x_1" - }, - "expectError": { - "isClientError": false, - "isTimeoutError": false } } ], @@ -6832,6 +6846,12 @@ { "client": "client", "events": [ + { + "commandStartedEvent": { + "commandName": "createIndexes", + "databaseName": "test" + } + }, { "commandStartedEvent": { "commandName": "dropIndexes", @@ -6903,6 +6923,16 @@ ] } }, + { + "name": "createIndex", + "object": "collection", + "arguments": { + "keys": { + "x": 1 + }, + "name": "x_1" + } + }, { "name": "dropIndex", "object": "collection", @@ -6910,10 +6940,6 @@ "timeoutMS": 1000, "maxTimeMS": 5000, "name": "x_1" - }, - "expectError": { - "isClientError": false, - "isTimeoutError": false } } ], @@ -6921,6 +6947,12 @@ { "client": "client", "events": [ + { + "commandStartedEvent": { + "commandName": "createIndexes", + "databaseName": "test" + } + }, { "commandStartedEvent": { "commandName": "dropIndexes", @@ -7003,6 +7035,17 @@ } } }, + { + "name": "createIndex", + "object": "collection", + "arguments": { + "keys": { + "x": 1 + }, + "name": "x_1", + "timeoutMS": 100000 + } + }, { "name": "dropIndexes", "object": "collection", diff --git a/test/spec/client-side-operations-timeout/deprecated-options.yml b/test/spec/client-side-operations-timeout/deprecated-options.yml index 582a8983ae2..e3378d5fa8f 100644 --- a/test/spec/client-side-operations-timeout/deprecated-options.yml +++ b/test/spec/client-side-operations-timeout/deprecated-options.yml @@ -3743,16 +3743,19 @@ tests: failCommands: ["dropIndexes"] blockConnection: true blockTimeMS: 5 + # Create the index first so dropIndex doesn't return IndexNotFound on + # servers prior to 8.3. + - name: createIndex + object: *collection + arguments: + keys: { x: 1 } + timeoutMS: 100000 + name: "x_1" - name: dropIndex object: *collection arguments: timeoutMS: 100000 name: "x_1" - - expectError: - isClientError: false - isTimeoutError: false - - description: "wTimeoutMS is ignored if timeoutMS is set - dropIndex on collection" operations: - name: createEntities @@ -3781,18 +3784,26 @@ tests: - session: id: &session session client: *client + # Create the index first so dropIndex doesn't return IndexNotFound on + # servers prior to 8.3. + - name: createIndex + object: *collection + arguments: + keys: { x: 1 } + timeoutMS: 100000 + name: "x_1" - name: dropIndex object: *collection arguments: timeoutMS: 100000 name: "x_1" - - expectError: - isClientError: false - isTimeoutError: false expectEvents: - client: *client events: + - commandStartedEvent: + commandName: createIndexes + databaseName: *databaseName + - commandStartedEvent: commandName: dropIndexes databaseName: *databaseName @@ -3828,19 +3839,26 @@ tests: - session: id: &session session client: *client + # Create the index first so dropIndex doesn't return IndexNotFound on + # servers prior to 8.3. + - name: createIndex + object: *collection + arguments: + keys: { x: 1 } + name: "x_1" - name: dropIndex object: *collection arguments: timeoutMS: &timeoutMS 1000 maxTimeMS: 5000 name: "x_1" - - expectError: - isClientError: false - isTimeoutError: false expectEvents: - client: *client events: + - commandStartedEvent: + commandName: createIndexes + databaseName: *databaseName + - commandStartedEvent: commandName: dropIndexes databaseName: *databaseName @@ -3884,6 +3902,14 @@ tests: failCommands: ["dropIndexes"] blockConnection: true blockTimeMS: 5 + # Create the index first so dropIndex doesn't return IndexNotFound on + # servers prior to 8.3. + - name: createIndex + object: *collection + arguments: + keys: { x: 1 } + name: "x_1" + timeoutMS: 100000 - name: dropIndexes object: *collection arguments: @@ -3979,4 +4005,4 @@ tests: command: dropIndexes: *collectionName maxTimeMS: { $$lte: *timeoutMS } - \ No newline at end of file + diff --git a/test/spec/client-side-operations-timeout/global-timeoutMS.json b/test/spec/client-side-operations-timeout/global-timeoutMS.json index 740bbad2e2c..f1edbe68e39 100644 --- a/test/spec/client-side-operations-timeout/global-timeoutMS.json +++ b/test/spec/client-side-operations-timeout/global-timeoutMS.json @@ -5621,15 +5621,21 @@ } } }, + { + "name": "createIndex", + "object": "collection", + "arguments": { + "keys": { + "x": 1 + }, + "name": "x_1" + } + }, { "name": "dropIndex", "object": "collection", "arguments": { "name": "x_1" - }, - "expectError": { - "isClientError": false, - "isTimeoutError": false } } ], @@ -5637,6 +5643,12 @@ { "client": "client", "events": [ + { + "commandStartedEvent": { + "commandName": "createIndexes", + "databaseName": "test" + } + }, { "commandStartedEvent": { "commandName": "dropIndexes", diff --git a/test/spec/client-side-operations-timeout/global-timeoutMS.yml b/test/spec/client-side-operations-timeout/global-timeoutMS.yml index 7b4a78ac785..847c26f096b 100644 --- a/test/spec/client-side-operations-timeout/global-timeoutMS.yml +++ b/test/spec/client-side-operations-timeout/global-timeoutMS.yml @@ -3120,17 +3120,24 @@ tests: failCommands: ["dropIndexes"] blockConnection: true blockTimeMS: 15 + # Create the index first so dropIndex doesn't return IndexNotFound on + # servers prior to 8.3. + - name: createIndex + object: *collection + arguments: + keys: { x: 1 } + name: "x_1" - name: dropIndex object: *collection arguments: name: "x_1" - - expectError: - isClientError: false - isTimeoutError: false expectEvents: - client: *client events: + - commandStartedEvent: + commandName: createIndexes + databaseName: *databaseName + - commandStartedEvent: commandName: dropIndexes databaseName: *databaseName @@ -3233,4 +3240,4 @@ tests: command: dropIndexes: *collectionName maxTimeMS: { $$exists: false } - \ No newline at end of file + diff --git a/test/spec/client-side-operations-timeout/override-collection-timeoutMS.json b/test/spec/client-side-operations-timeout/override-collection-timeoutMS.json index d17e22fc2f4..c56d45bcbbe 100644 --- a/test/spec/client-side-operations-timeout/override-collection-timeoutMS.json +++ b/test/spec/client-side-operations-timeout/override-collection-timeoutMS.json @@ -3251,15 +3251,21 @@ } } }, + { + "name": "createIndex", + "object": "collection", + "arguments": { + "keys": { + "x": 1 + }, + "name": "x_1" + } + }, { "name": "dropIndex", "object": "collection", "arguments": { "name": "x_1" - }, - "expectError": { - "isClientError": false, - "isTimeoutError": false } } ], @@ -3267,6 +3273,12 @@ { "client": "client", "events": [ + { + "commandStartedEvent": { + "commandName": "createIndexes", + "databaseName": "test" + } + }, { "commandStartedEvent": { "commandName": "dropIndexes", @@ -3327,15 +3339,21 @@ } } }, + { + "name": "createIndex", + "object": "collection", + "arguments": { + "keys": { + "x": 1 + }, + "name": "x_1" + } + }, { "name": "dropIndex", "object": "collection", "arguments": { "name": "x_1" - }, - "expectError": { - "isClientError": false, - "isTimeoutError": false } } ], @@ -3343,6 +3361,12 @@ { "client": "client", "events": [ + { + "commandStartedEvent": { + "commandName": "createIndexes", + "databaseName": "test" + } + }, { "commandStartedEvent": { "commandName": "dropIndexes", diff --git a/test/spec/client-side-operations-timeout/override-collection-timeoutMS.yml b/test/spec/client-side-operations-timeout/override-collection-timeoutMS.yml index d1d1c61056f..07e2a144294 100644 --- a/test/spec/client-side-operations-timeout/override-collection-timeoutMS.yml +++ b/test/spec/client-side-operations-timeout/override-collection-timeoutMS.yml @@ -1745,17 +1745,24 @@ tests: failCommands: ["dropIndexes"] blockConnection: true blockTimeMS: 15 + # Create the index first so dropIndex doesn't return IndexNotFound on + # servers prior to 8.3. + - name: createIndex + object: *collection + arguments: + keys: { x: 1 } + name: "x_1" - name: dropIndex object: *collection arguments: name: "x_1" - - expectError: - isClientError: false - isTimeoutError: false expectEvents: - client: *client events: + - commandStartedEvent: + commandName: createIndexes + databaseName: *databaseName + - commandStartedEvent: commandName: dropIndexes databaseName: *databaseName @@ -1785,17 +1792,24 @@ tests: failCommands: ["dropIndexes"] blockConnection: true blockTimeMS: 15 + # Create the index first so dropIndex doesn't return IndexNotFound on + # servers prior to 8.3. + - name: createIndex + object: *collection + arguments: + keys: { x: 1 } + name: "x_1" - name: dropIndex object: *collection arguments: name: "x_1" - - expectError: - isClientError: false - isTimeoutError: false expectEvents: - client: *client events: + - commandStartedEvent: + commandName: createIndexes + databaseName: *databaseName + - commandStartedEvent: commandName: dropIndexes databaseName: *databaseName @@ -1874,4 +1888,4 @@ tests: command: dropIndexes: *collectionName maxTimeMS: { $$exists: false } - \ No newline at end of file + diff --git a/test/spec/client-side-operations-timeout/override-database-timeoutMS.json b/test/spec/client-side-operations-timeout/override-database-timeoutMS.json index f7fa642c582..11ff7a59fd4 100644 --- a/test/spec/client-side-operations-timeout/override-database-timeoutMS.json +++ b/test/spec/client-side-operations-timeout/override-database-timeoutMS.json @@ -4354,15 +4354,21 @@ } } }, + { + "name": "createIndex", + "object": "collection", + "arguments": { + "keys": { + "x": 1 + }, + "name": "x_1" + } + }, { "name": "dropIndex", "object": "collection", "arguments": { "name": "x_1" - }, - "expectError": { - "isClientError": false, - "isTimeoutError": false } } ], @@ -4370,6 +4376,12 @@ { "client": "client", "events": [ + { + "commandStartedEvent": { + "commandName": "createIndexes", + "databaseName": "test" + } + }, { "commandStartedEvent": { "commandName": "dropIndexes", @@ -4437,15 +4449,21 @@ } } }, + { + "name": "createIndex", + "object": "collection", + "arguments": { + "keys": { + "x": 1 + }, + "name": "x_1" + } + }, { "name": "dropIndex", "object": "collection", "arguments": { "name": "x_1" - }, - "expectError": { - "isClientError": false, - "isTimeoutError": false } } ], @@ -4453,6 +4471,12 @@ { "client": "client", "events": [ + { + "commandStartedEvent": { + "commandName": "createIndexes", + "databaseName": "test" + } + }, { "commandStartedEvent": { "commandName": "dropIndexes", diff --git a/test/spec/client-side-operations-timeout/override-database-timeoutMS.yml b/test/spec/client-side-operations-timeout/override-database-timeoutMS.yml index aed7b43720e..4ded17164d5 100644 --- a/test/spec/client-side-operations-timeout/override-database-timeoutMS.yml +++ b/test/spec/client-side-operations-timeout/override-database-timeoutMS.yml @@ -2343,17 +2343,24 @@ tests: failCommands: ["dropIndexes"] blockConnection: true blockTimeMS: 15 + # Create the index first so dropIndex doesn't return IndexNotFound on + # servers prior to 8.3. + - name: createIndex + object: *collection + arguments: + keys: { x: 1 } + name: "x_1" - name: dropIndex object: *collection arguments: name: "x_1" - - expectError: - isClientError: false - isTimeoutError: false expectEvents: - client: *client events: + - commandStartedEvent: + commandName: createIndexes + databaseName: *databaseName + - commandStartedEvent: commandName: dropIndexes databaseName: *databaseName @@ -2387,17 +2394,24 @@ tests: failCommands: ["dropIndexes"] blockConnection: true blockTimeMS: 15 + # Create the index first so dropIndex doesn't return IndexNotFound on + # servers prior to 8.3. + - name: createIndex + object: *collection + arguments: + keys: { x: 1 } + name: "x_1" - name: dropIndex object: *collection arguments: name: "x_1" - - expectError: - isClientError: false - isTimeoutError: false expectEvents: - client: *client events: + - commandStartedEvent: + commandName: createIndexes + databaseName: *databaseName + - commandStartedEvent: commandName: dropIndexes databaseName: *databaseName @@ -2484,4 +2498,4 @@ tests: command: dropIndexes: *collectionName maxTimeMS: { $$exists: false } - \ No newline at end of file + diff --git a/test/spec/client-side-operations-timeout/override-operation-timeoutMS.json b/test/spec/client-side-operations-timeout/override-operation-timeoutMS.json index 6fa0bd802a6..f33f876137f 100644 --- a/test/spec/client-side-operations-timeout/override-operation-timeoutMS.json +++ b/test/spec/client-side-operations-timeout/override-operation-timeoutMS.json @@ -3378,15 +3378,23 @@ } } }, + { + "name": "createIndex", + "object": "collection", + "arguments": { + "keys": { + "x": 1 + }, + "timeoutMS": 1000, + "name": "x_1" + } + }, { "name": "dropIndex", "object": "collection", "arguments": { "timeoutMS": 1000, "name": "x_1" - }, - "expectError": { - "isTimeoutError": false } } ], @@ -3394,6 +3402,12 @@ { "client": "client", "events": [ + { + "commandStartedEvent": { + "commandName": "createIndexes", + "databaseName": "test" + } + }, { "commandStartedEvent": { "commandName": "dropIndexes", @@ -3436,15 +3450,23 @@ } } }, + { + "name": "createIndex", + "object": "collection", + "arguments": { + "keys": { + "x": 1 + }, + "timeoutMS": 0, + "name": "x_1" + } + }, { "name": "dropIndex", "object": "collection", "arguments": { "timeoutMS": 0, "name": "x_1" - }, - "expectError": { - "isTimeoutError": false } } ], @@ -3452,6 +3474,12 @@ { "client": "client", "events": [ + { + "commandStartedEvent": { + "commandName": "createIndexes", + "databaseName": "test" + } + }, { "commandStartedEvent": { "commandName": "dropIndexes", diff --git a/test/spec/client-side-operations-timeout/override-operation-timeoutMS.yml b/test/spec/client-side-operations-timeout/override-operation-timeoutMS.yml index 28eabcb7c8b..370e9393cfe 100644 --- a/test/spec/client-side-operations-timeout/override-operation-timeoutMS.yml +++ b/test/spec/client-side-operations-timeout/override-operation-timeoutMS.yml @@ -1812,17 +1812,26 @@ tests: failCommands: ["dropIndexes"] blockConnection: true blockTimeMS: 15 + # Create the index first so dropIndex doesn't return IndexNotFound on + # servers prior to 8.3. + - name: createIndex + object: *collection + arguments: + keys: { x: 1 } + timeoutMS: 1000 + name: "x_1" - name: dropIndex object: *collection arguments: timeoutMS: 1000 name: "x_1" - - expectError: - isTimeoutError: false # IndexNotFound expectEvents: - client: *client events: + - commandStartedEvent: + commandName: createIndexes + databaseName: *databaseName + - commandStartedEvent: commandName: dropIndexes databaseName: *databaseName @@ -1842,17 +1851,26 @@ tests: failCommands: ["dropIndexes"] blockConnection: true blockTimeMS: 15 + # Create the index first so dropIndex doesn't return IndexNotFound on + # servers prior to 8.3. + - name: createIndex + object: *collection + arguments: + keys: { x: 1 } + timeoutMS: 0 + name: "x_1" - name: dropIndex object: *collection arguments: timeoutMS: 0 name: "x_1" - - expectError: - isTimeoutError: false # IndexNotFound expectEvents: - client: *client events: + - commandStartedEvent: + commandName: createIndexes + databaseName: *databaseName + - commandStartedEvent: commandName: dropIndexes databaseName: *databaseName @@ -1915,4 +1933,4 @@ tests: command: dropIndexes: *collectionName maxTimeMS: { $$exists: false } - \ No newline at end of file +