From 5ef49c0258887cc80e803a9d903b7bc62c2c9c5c Mon Sep 17 00:00:00 2001 From: Thijs Cadier Date: Wed, 23 Sep 2015 23:29:18 +0200 Subject: [PATCH] Drop collection in find and modify test --- tests/collection.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/collection.rs b/tests/collection.rs index d553989..77f028a 100644 --- a/tests/collection.rs +++ b/tests/collection.rs @@ -133,7 +133,8 @@ fn test_find_and_modify() { let uri = Uri::new("mongodb://localhost:27017/").unwrap(); let pool = ClientPool::new(uri, None); let client = pool.pop(); - let collection = client.get_collection("rust_driver_test", "find_and_modify"); + let mut collection = client.get_collection("rust_driver_test", "find_and_modify"); + collection.drop().unwrap_or(()); // Upsert something, it should now exist let query = doc! {