From 2fc81a81806ae03f74b113c6a150a01e3f1235c9 Mon Sep 17 00:00:00 2001 From: "Michael S. Klishin" Date: Tue, 19 Jun 2012 12:21:28 +0400 Subject: [PATCH] More robust test, does not depend on test run order and concurrently running tests --- test/monger/test/ragtime_test.clj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/monger/test/ragtime_test.clj b/test/monger/test/ragtime_test.clj index c6496eb..d0e5ecf 100644 --- a/test/monger/test/ragtime_test.clj +++ b/test/monger/test/ragtime_test.clj @@ -19,6 +19,7 @@ (let [db (mg/get-db "monger-test") coll "meta.migrations" key "1"] + (mc/remove db coll {}) (is (not (mc/any? db coll {:_id key}))) (is (not (contains? (applied-migration-ids db) key))) (add-migration-id db key) @@ -30,6 +31,7 @@ (let [db (mg/get-db "monger-test") coll "meta.migrations" key "1"] + (mc/remove db coll {}) (add-migration-id db key) (is (mc/any? db coll {:_id key})) (is (contains? (applied-migration-ids db) key))