--TEST-- MongoDB\Driver\Manager destruct should not free streams that are still in use --SKIPIF-- --INI-- ignore_repeated_errors=1 --FILE-- insert(array('_id' => 1)); $writeResult = $manager1->executeBulkWrite(NS, $bulk); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(array('_id' => 2)); $writeResult = $manager2->executeBulkWrite(NS, $bulk); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $manager2 = null; $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(array('_id' => 3)); $writeResult = $manager1->executeBulkWrite(NS, $bulk); printf("Inserted: %d\n", $writeResult->getInsertedCount()); ?> ===DONE=== --EXPECT-- Inserted: 1 Inserted: 1 Inserted: 1 ===DONE===