|
58 | 58 | import java.util.stream.Collectors;
|
59 | 59 |
|
60 | 60 | import static com.mongodb.ClusterFixture.TIMEOUT_DURATION;
|
| 61 | +import static com.mongodb.ClusterFixture.applyTimeoutMultiplierForServerless; |
61 | 62 | import static com.mongodb.ClusterFixture.isDiscoverableReplicaSet;
|
62 | 63 | import static com.mongodb.ClusterFixture.isServerlessTest;
|
63 | 64 | import static com.mongodb.ClusterFixture.serverVersionAtLeast;
|
@@ -119,12 +120,12 @@ public void testGridFSUploadViaOpenUploadStreamTimeout() {
|
119 | 120 | + " data: {"
|
120 | 121 | + " failCommands: [\"insert\"],"
|
121 | 122 | + " blockConnection: true,"
|
122 |
| - + " blockTimeMS: " + (rtt + 405) |
| 123 | + + " blockTimeMS: " + (rtt + applyTimeoutMultiplierForServerless(405)) |
123 | 124 | + " }"
|
124 | 125 | + "}");
|
125 | 126 |
|
126 | 127 | try (MongoClient client = createReactiveClient(getMongoClientSettingsBuilder()
|
127 |
| - .timeout(rtt + 400, TimeUnit.MILLISECONDS))) { |
| 128 | + .timeout(rtt + applyTimeoutMultiplierForServerless(400), TimeUnit.MILLISECONDS))) { |
128 | 129 | MongoDatabase database = client.getDatabase(gridFsFileNamespace.getDatabaseName());
|
129 | 130 | GridFSBucket gridFsBucket = createReaciveGridFsBucket(database, GRID_FS_BUCKET_NAME);
|
130 | 131 |
|
@@ -178,12 +179,12 @@ public void testAbortingGridFsUploadStreamTimeout() throws ExecutionException, I
|
178 | 179 | + " data: {"
|
179 | 180 | + " failCommands: [\"delete\"],"
|
180 | 181 | + " blockConnection: true,"
|
181 |
| - + " blockTimeMS: " + (rtt + 405) |
| 182 | + + " blockTimeMS: " + (rtt + applyTimeoutMultiplierForServerless(405)) |
182 | 183 | + " }"
|
183 | 184 | + "}");
|
184 | 185 |
|
185 | 186 | try (MongoClient client = createReactiveClient(getMongoClientSettingsBuilder()
|
186 |
| - .timeout(rtt + 400, TimeUnit.MILLISECONDS))) { |
| 187 | + .timeout(rtt + applyTimeoutMultiplierForServerless(400), TimeUnit.MILLISECONDS))) { |
187 | 188 | MongoDatabase database = client.getDatabase(gridFsFileNamespace.getDatabaseName());
|
188 | 189 | GridFSBucket gridFsBucket = createReaciveGridFsBucket(database, GRID_FS_BUCKET_NAME);
|
189 | 190 |
|
|
0 commit comments