Skip to content
Snippets Groups Projects
Commit 34222842 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

a couple small tweaks to our activity unit tests to prevent race conditions...

a couple small tweaks to our activity unit tests to prevent race conditions which intermittently cause test failures.
parent 4953ff67
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@
; 2. :user and :model_exists are hydrated
; NOTE: timestamp matching was being a real PITA so I cheated a bit. ideally we'd fix that
(expect-let [_ (user->client :crowberto) ; HACK. we do this to create the user-joined activity after first login before we delete it
(expect-let [client (user->client :crowberto) ; we do this to create the user-joined activity after first login before we clear out activity for the test
_ (korma.core/delete Activity) ; clear out any existing activity
activity1 (db/ins Activity
:topic "install"
......@@ -98,7 +98,7 @@
:table nil
:custom_id nil
:details $})]
(->> ((user->client :crowberto) :get 200 "activity")
(->> (client :get 200 "activity")
(map #(dissoc % :timestamp))))
......@@ -157,7 +157,8 @@
:user_id user
:model model
:model_id model-id
:timestamp (u/new-sql-timestamp)))]
:timestamp (u/new-sql-timestamp))
(Thread/sleep 25))]
(do
(create-view (user->id :crowberto) "card" (:id card2))
(create-view (user->id :crowberto) "dashboard" (:id dash1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment