Permalink
Browse files

Added a timeout to the promises to support things that don't happen

  • Loading branch information...
1 parent 96a42ec commit fc3456f133b50b2a0d9227cc1ddc50a7aa81a862 @bivory committed Mar 10, 2013
Showing with 3 additions and 4 deletions.
  1. +3 −4 test/watch_do/watcher_test.clj
View
7 test/watch_do/watcher_test.clj
@@ -23,7 +23,8 @@
[check parent-path ev path]
;;(println "watching for" ev path)
(let [cb (:cb @check)]
- (and (= (:ev @cb) ev)
+ (and (not= nil (deref cb 15000 nil))
+ (= (:ev @cb) ev)
(= (str parent-path (:path @cb)) path))))
(facts
@@ -32,8 +33,6 @@
file (str path (fs/temp-name "tmp"))]
"A user can unwatch a directory"
- ;; TODO need to use a timeout
- (comment
(set-watching! check)
(watch-path path
:create (partial cb check)
@@ -42,7 +41,7 @@
(unwatch-path path)
(fs/mkdir dir)
(watching-for check path :create dir) => false
- (fs/delete-dir dir))
+ (fs/delete-dir dir)
"A user can watch a directory for changes"
(watch-path path

0 comments on commit fc3456f

Please sign in to comment.