-
I've been trying to setup some tests that automatically stop the server when finishing by running (helpers/service-fn) in a new thread or (deftest my-test
(let [server (atom nil)]
(async/go
(reset! server (helpers/service-fn "test/com/moclojer/resources/moclojer-v2.yaml")))
;; ... do stuff
(p.http/stop @server))) However, that doesn't seem to work. Even if i use thread, future, or whatever. I can't get to set the server atom with the new value. I'm quite sure it's a problem with the way I'm trying to do This problem arose during the development of #262 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
@J0sueTM wouldn't that be what you're trying to do? moclojer/test/com/moclojer/framework_test.clj Lines 8 to 23 in 660da61 if not, I think I didn't understand the problem you are reporting |
Beta Was this translation helpful? Give feedback.
@avelino After fiddling around with service-fn, I discovered that we actually don't need to create a webserver in order to use moclojer. All we need to do is "start" it as a pedestal interceptor: