@@ -33,7 +33,7 @@ public function testResume()
33
33
{
34
34
$ this ->insertDocument (['_id ' => 1 , 'x ' => 'foo ' ]);
35
35
36
- $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), []);
36
+ $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), [], [ ' maxAwaitTimeMS ' => 100 ] );
37
37
$ changeStream = $ operation ->execute ($ this ->getPrimaryServer ());
38
38
39
39
$ changeStream ->rewind ();
@@ -130,7 +130,7 @@ public function testNoChangeAfterResumeBeforeInsert()
130
130
{
131
131
$ this ->insertDocument (['_id ' => 1 , 'x ' => 'foo ' ]);
132
132
133
- $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), []);
133
+ $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), [], [ ' maxAwaitTimeMS ' => 100 ] );
134
134
$ changeStream = $ operation ->execute ($ this ->getPrimaryServer ());
135
135
136
136
$ changeStream ->rewind ();
@@ -172,7 +172,7 @@ public function testNoChangeAfterResumeBeforeInsert()
172
172
173
173
public function testResumeAfterKillThenNoOperations ()
174
174
{
175
- $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), []);
175
+ $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), [], [ ' maxAwaitTimeMS ' => 100 ] );
176
176
$ changeStream = $ operation ->execute ($ this ->getPrimaryServer ());
177
177
178
178
$ this ->killChangeStreamCursor ($ changeStream );
@@ -183,7 +183,7 @@ public function testResumeAfterKillThenNoOperations()
183
183
184
184
public function testResumeAfterKillThenOperation ()
185
185
{
186
- $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), []);
186
+ $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), [], [ ' maxAwaitTimeMS ' => 100 ] );
187
187
$ changeStream = $ operation ->execute ($ this ->getPrimaryServer ());
188
188
189
189
$ this ->killChangeStreamCursor ($ changeStream );
@@ -196,7 +196,7 @@ public function testResumeAfterKillThenOperation()
196
196
197
197
public function testKey ()
198
198
{
199
- $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), []);
199
+ $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), [], [ ' maxAwaitTimeMS ' => 100 ] );
200
200
$ changeStream = $ operation ->execute ($ this ->getPrimaryServer ());
201
201
202
202
$ this ->assertNull ($ changeStream ->key ());
@@ -226,7 +226,7 @@ public function testNonEmptyPipeline()
226
226
{
227
227
$ pipeline = [['$project ' => ['foo ' => [0 ]]]];
228
228
229
- $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), $ pipeline );
229
+ $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), $ pipeline, [ ' maxAwaitTimeMS ' => 100 ] );
230
230
$ changeStream = $ operation ->execute ($ this ->getPrimaryServer ());
231
231
232
232
$ this ->insertDocument (['_id ' => 1 ]);
@@ -243,7 +243,7 @@ public function testNonEmptyPipeline()
243
243
244
244
public function testCursorWithEmptyBatchNotClosed ()
245
245
{
246
- $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), []);
246
+ $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), [], [ ' maxAwaitTimeMS ' => 100 ] );
247
247
$ changeStream = $ operation ->execute ($ this ->getPrimaryServer ());
248
248
249
249
$ this ->assertNotNull ($ changeStream );
@@ -256,7 +256,7 @@ public function testFailureAfterResumeTokenRemoved()
256
256
{
257
257
$ pipeline = [['$project ' => ['_id ' => 0 ]]];
258
258
259
- $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), $ pipeline );
259
+ $ operation = new Watch ($ this ->manager , $ this ->getDatabaseName (), $ this ->getCollectionName (), $ pipeline, [ ' maxAwaitTimeMS ' => 100 ] );
260
260
$ changeStream = $ operation ->execute ($ this ->getPrimaryServer ());
261
261
262
262
$ this ->insertDocument (['x ' => 1 ]);
0 commit comments