We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5ce656 commit a928500Copy full SHA for a928500
tests/Operation/AggregateFunctionalTest.php
@@ -190,7 +190,13 @@ public function testExplainOption()
190
$results = iterator_to_array($operation->execute($this->getPrimaryServer()));
191
192
$this->assertCount(1, $results);
193
- $this->assertArrayHasKey('stages', $results[0]);
+
194
+ /* MongoDB 4.2 may optimize aggregate pipelines into queries, which can
195
+ * result in different explain output (see: SERVER-24860) */
196
+ $this->assertThat($results[0], $this->logicalOr(
197
+ $this->arrayHasKey('stages'),
198
+ $this->arrayHasKey('queryPlanner')
199
+ ));
200
}
201
202
public function testExplainOptionWithWriteConcern()
0 commit comments