Skip to content

Commit

Permalink
Fix test daemon checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon Barrett committed Jul 24, 2014
1 parent 22643fb commit 36506af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/com/climate/claypoole_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@
(let [factory (.getThreadFactory pool)
start (promise)
thread (.newThread factory #(deref start))]
(is (false? (.isDaemon thread)))
(is (true? (.isDaemon thread)))
(is (not (empty? (re-find #"claypoole-[0-9]*-4" (.getName thread)))))
(is (= (.getPriority (Thread/currentThread)) (.getPriority thread)))))
(cp/with-shutdown! [pool (pool-constructor 4
:daemon true
:daemon false
:name "fiberpond"
:thread-priority 4)]
(dotimes [_ 8] (.submit pool #(inc 1)))
(let [factory (.getThreadFactory pool)
start (promise)
thread (.newThread factory #(deref start))]
(is (true? (.isDaemon thread)))
(is (false? (.isDaemon thread)))
(is (= "fiberpond-4" (.getName thread)))
(is (= 4 (.getPriority thread))))))

Expand Down

0 comments on commit 36506af

Please sign in to comment.