-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.3.0
-
Component/s: None
-
Empty show more show less
I don't get any error in the first example but I should. If I use a callback, I get it.
await server.stop(); try { const r = await db.things.insertOne({ a: 1 }); //no error, r is undefined } catch (err) { console.log(err); } await server.restart(); const r = await db.things.insertOne({ a: 1 }); assert(r.insertedCount === 1); //it works
db.things.insertOne({ a: 1 }, (err, result) => { if (err) { //"MongoTimeoutError" "Server selection timed out after 10000 ms" return reject(err); } resolve(result); })
Node 10.16.0
"mongodb-topology-manager": "^2.1.0"
"mongodb": "^3.3.0"