--TEST-- MongoDB\Driver\Server::executeQuery() with conflicting read preference for secondary --SKIPIF-- --FILE-- selectServer($rp); echo throws(function() use ($secondary) { $rp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY); $secondary->executeQuery(NS, new MongoDB\Driver\Query(array("x" => 1)), $rp); }, "MongoDB\Driver\Exception\RuntimeException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\RuntimeException not master and slaveOk=false ===DONE===