File tree Expand file tree Collapse file tree 4 files changed +118
-60
lines changed Expand file tree Collapse file tree 4 files changed +118
-60
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ class ChangeStream implements Iterator
46
46
136 , // CappedPositionLost
47
47
237 , // CursorKilled
48
48
11601 , // Interrupted
49
+ 280 , // ChangeStreamFatalError
49
50
];
50
51
51
52
private $ resumeCallable ;
@@ -172,6 +173,11 @@ private function isResumableError(RuntimeException $exception)
172
173
return false ;
173
174
}
174
175
176
+ /* The ServerException doesn't expose the NonResumableChangeStreamError
177
+ * label. Thus, the error code for the corresponding server exception
178
+ * has been marked as non-resumable. This can be reverted once PHPC-1419
179
+ * is fixed.
180
+ */
175
181
if ($ exception ->hasErrorLabel ('NonResumableChangeStreamError ' )) {
176
182
return false ;
177
183
}
Original file line number Diff line number Diff line change @@ -935,6 +935,10 @@ public function testChangeStreamExample_1_4()
935
935
{
936
936
$ this ->skipIfChangeStreamIsNotSupported ();
937
937
938
+ if ($ this ->isShardedCluster ()) {
939
+ $ this ->markTestSkipped ('Test does not apply on sharded clusters: need more than a single getMore call on the change stream. ' );
940
+ }
941
+
938
942
$ db = new Database ($ this ->manager , $ this ->getDatabaseName ());
939
943
$ db ->dropCollection ('inventory ' );
940
944
$ db ->createCollection ('inventory ' );
Original file line number Diff line number Diff line change @@ -332,9 +332,6 @@ protected function skipIfChangeStreamIsNotSupported()
332
332
if (! $ this ->isShardedClusterUsingReplicasets ()) {
333
333
$ this ->markTestSkipped ('$changeStream is only supported with replicasets ' );
334
334
}
335
-
336
- // Temporarily skip tests because of an issue with change streams in the driver
337
- $ this ->markTestSkipped ('$changeStreams currently don \'t on replica sets ' );
338
335
break ;
339
336
340
337
case Server::TYPE_RS_PRIMARY :
You can’t perform that action at this time.
0 commit comments