public function testAggregateTimeoutException()
{
$collection = $this->getCollection();
$this->failMaxTimeMS();
$this->setExpectedException('MongoExecutionTimeoutException');
$pipeline = [['$group' => ['_id' => '$foo', 'count' => ['$sum' => 1]]], ['$sort' => ['_id' => 1]]];
$collection->aggregate($pipeline, ['maxTimeMS' => 1]);
}