On Sun, Dec 28, 2014 at 9:52 AM, rogergl <ro...@gilliar.de> wrote: > it seems as if there is a test package for vertx and Clojure > (vertx.testools) > > Since I would like to test my vertices I tried this simple approach: > > (tt/as-embedded (fn [] > (core/deploy-verticle "project/vertices/time.clj") > (tt/test-complete*)))
The above code will cause the test to exit immediately, before the verticle finishes deploying. You probably want to call test-complete* from an on-message handler listening to const/topic-time. See https://github.com/vert-x/mod-lang-clojure/blob/master/api/src/test/clojure/vertx/eventbus_test.clj for examples of this technique. If that doesn't make sense or you are still having issues, feel free to open an issue on https://github.com/vert-x/mod-lang-clojure/ and we'll see if we can get you fixed up. > > But this gives me a timeout. > > BTW: The vertice is really simple: > > (core/periodic 1000 > (let [now (h/now)] > (eb/publish const/topic-time (h/to-transit {:date-time > now})))) > > > The question is: Is it possible to tests vertices that use the eventbus ? > And if it is possible how it is done ? > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.