mongo <- mongo.create()
if (mongo.is.connected(mongo)) {
mongo.set.timeout(mongo, 2000L)
timeout <- mongo.get.timeout(mongo)
if (timeout != 2000L)
error("expected timeout of 2000");
}
Run the code above in your browser using DataLab