Skip to content

Commit

Permalink
DRIVERS-2969: increase CSOT timeouts for session prose tests (#1643)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken authored Sep 4, 2024
1 parent 649818a commit 12d9c8e
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions source/client-side-operations-timeout/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ error occurs.

### 6. GridFS - Upload

Tests in this section MUST only be run against server versions 4.4 and higher.
Tests in this section MUST only be run against server versions 4.4 and higher. Drivers SHOULD apply
[useMultipleMongoses=false](../../unified-test-format/unified-test-format.md#entity) as described in the unified test
format when testing on sharded clusters to ensure failpoint are hit by only using one mongos.

#### uploads via openUploadStream can be timed out

Expand All @@ -329,12 +331,12 @@ Tests in this section MUST only be run against server versions 4.4 and higher.
data: {
failCommands: ["insert"],
blockConnection: true,
blockTimeMS: 15
blockTimeMS: 200
}
}
```

3. Create a new MongoClient (referred to as `client`) with `timeoutMS=10`.
3. Create a new MongoClient (referred to as `client`) with `timeoutMS=150`.

4. Using `client`, create a GridFS bucket (referred to as `bucket`) that wraps the `db` database.

Expand Down Expand Up @@ -364,12 +366,12 @@ This test only applies to drivers that provide an API to abort a GridFS upload s
data: {
failCommands: ["delete"],
blockConnection: true,
blockTimeMS: 15
blockTimeMS: 200
}
}
```

3. Create a new MongoClient (referred to as `client`) with `timeoutMS=10`.
3. Create a new MongoClient (referred to as `client`) with `timeoutMS=150`.

4. Using `client`, create a GridFS bucket (referred to as `bucket`) that wraps the `db` database with
`chunkSizeBytes=2`.
Expand All @@ -387,7 +389,9 @@ This test only applies to drivers that provide an API to abort a GridFS upload s

### 7. GridFS - Download

This test MUST only be run against server versions 4.4 and higher.
This test MUST only be run against server versions 4.4 and higher. Drivers SHOULD apply
[useMultipleMongoses=false](../../unified-test-format/unified-test-format.md#entity) as described in the unified test
format when testing on sharded clusters to ensure failpoint are hit by only using one mongos.

1. Using `internalClient`, drop and re-create the `db.fs.files` and `db.fs.chunks` collections.

Expand All @@ -411,7 +415,7 @@ This test MUST only be run against server versions 4.4 and higher.
}
```

3. Create a new MongoClient (referred to as `client`) with `timeoutMS=10`.
3. Create a new MongoClient (referred to as `client`) with `timeoutMS=150`.

4. Using `client`, create a GridFS bucket (referred to as `bucket`) that wraps the `db` database.

Expand All @@ -429,7 +433,7 @@ This test MUST only be run against server versions 4.4 and higher.
data: {
failCommands: ["find"],
blockConnection: true,
blockTimeMS: 15
blockTimeMS: 200
}
}
```
Expand Down Expand Up @@ -524,7 +528,7 @@ and password).
This test MUST only be run against replica sets and sharded clusters with server version 4.4 or higher. It MUST be run
three times: once with the timeout specified via the MongoClient `timeoutMS` option, once with the timeout specified via
the ClientSession `defaultTimeoutMS` option, and once more with the timeout specified via the `timeoutMS` option for the
`endSession` operation. In all cases, the timeout MUST be set to 10 milliseconds.
`endSession` operation. In all cases, the timeout MUST be set to 150 milliseconds.

1. Using `internalClient`, drop the `db.coll` collection.

Expand All @@ -537,7 +541,7 @@ the ClientSession `defaultTimeoutMS` option, and once more with the timeout spec
data: {
failCommands: ["abortTransaction"],
blockConnection: true,
blockTimeMS: 15
blockTimeMS: 200
}
}
```
Expand All @@ -555,7 +559,7 @@ the ClientSession `defaultTimeoutMS` option, and once more with the timeout spec

5. Using `session`, execute `session.end_session`

- Expect this to fail with a timeout error after no more than 15ms.
- Expect this to fail with a timeout error after no more than 150ms.

### 10. Convenient Transactions

Expand All @@ -574,12 +578,12 @@ Tests in this section MUST only run against replica sets and sharded clusters wi
data: {
failCommands: ["insert", "abortTransaction"],
blockConnection: true,
blockTimeMS: 15
blockTimeMS: 200
}
}
```

3. Create a new MongoClient (referred to as `client`) configured with `timeoutMS=10` and an explicit ClientSession
3. Create a new MongoClient (referred to as `client`) configured with `timeoutMS=150` and an explicit ClientSession
derived from that MongoClient (referred to as `session`).

4. Using `session`, execute a `withTransaction` operation with the following callback:
Expand Down

0 comments on commit 12d9c8e

Please sign in to comment.