All of the CRUD methods of the driver are synchronous unless done with an unacknowledged write concern (a writeconcern where w=0). I agree that the solution outlined with @Prasad_Saya is more robust and will also let you run tests in parallel if you choose to do that in the future. I’d also recommend doing a defer collection.Drop(ctx) as part of test cleanup so your tests don’t leave behind a large number of collections on the server.
1 Like