I'm using the clojure-maven-plugin v1.1 (latest shapshots of clojure and
clojure-contrib) to run a test for an agent that looks like this:
----------
(ns com.arcanearcade.clojure.utils.test-timer-agent
(:require [com.arcanearcade.clojure.utils.timer-agent :as ta])
(:use clojure.test))
(deftest test-timer-agent-add-five
(let [timer (ta/create-timer-agent #(+ % 5) :data 8 :run-once? true
:timer-ms 500)]
(is (= 8 (:data @timer)))
(ta/start-timer-agent timer)
(await-for 1000 timer)
(is (= 13 (:data @timer)))))
----------
All the tests run, complete, and report back their status but then the build
freezes until I hit ctrl-c
----------
[INFO] [clojure:test {execution: clojure-test}]
Testing com.arcanearcade.clojure.utils.test-file-utils
Testing com.arcanearcade.clojure.utils.test-regex-util
Testing com.arcanearcade.clojure.utils.test-timer-agent
Ran 40 tests containing 76 assertions.
0 failures, 0 errors.
^Crobert-stehwiens-macbook-pro:clojure-rstehwien-utils res$
----------
Is there anything wrong with testing an agent like this?
The whole project (with hanging test) can be found here:
http://github.com/rstehwien/clojure-utils
--Robert
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---