Skip to content

Commit

Permalink
Bumping wboss dep to fix [IMMUTANT-535]
Browse files Browse the repository at this point in the history
Slight mods to tests, not sure why we didn't catch this before.
  • Loading branch information
jcrossley3 committed Mar 10, 2015
1 parent 93bb374 commit 919aee2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion project.clj
Expand Up @@ -91,7 +91,7 @@
clj-http "1.0.1"

;; org.projectodd.wunderboss "0.4.1"
org.projectodd.wunderboss "1.x.incremental.197"
org.projectodd.wunderboss "1.x.incremental.201"
;; org.projectodd.wunderboss "0.5.0-SNAPSHOT"

org.immutant :version}}
Expand Down
32 changes: 15 additions & 17 deletions scheduling/test/immutant/scheduling_test.clj
Expand Up @@ -62,26 +62,24 @@
(limit 5)))]
(is (deref started? 5000 false))
(is (stop env))
(is (not (stop env)))
(reset! should-run? false)))
(is (not (stop env)))))

(deftest stop-should-take-kwargs
(let [started? (promise)
should-run? (atom true)]
(schedule
(fn []
(is @should-run?)
(deliver started? true))
(-> (id :foo)
(every 1)
(limit 5)))
(is (deref started? 5000 false))
(is (stop :id :foo))
(reset! should-run? false)))
(let [started? (promise)
should-run? (atom true)]
(schedule
(fn []
(is @should-run?)
(deliver started? true))
(-> (id :foo)
(every 10)
(limit 5000)))
(is (deref started? 5000 false))
(is (stop :id :foo))))

(deftest stop-should-stop-the-scheduler-when-no-jobs-remain
(let [job1 (schedule #())
job2 (schedule #())
(let [job1 (schedule #() :every :second)
job2 (schedule #() :every :second)
scheduler (.scheduler (scheduler {}))]
(is (not (.isShutdown scheduler)))
(stop job1)
Expand All @@ -90,7 +88,7 @@
(is (.isShutdown scheduler))))

(deftest stop-should-stop-all-threaded-jobs
(let [everything (-> (schedule #())
(let [everything (-> (schedule #() :every :second)
(dissoc :id)
(->> (schedule #()))
(dissoc :id)
Expand Down

0 comments on commit 919aee2

Please sign in to comment.