0.2.4 - tests
This commit is contained in:
parent
fc11d6d0cb
commit
42e3f44fcb
2 changed files with 78 additions and 67 deletions
|
|
@ -34,3 +34,6 @@ lein test :only babashka.classpath-test/classpath-env-test
|
|||
|
||||
export BABASHKA_POD_TEST=true
|
||||
lein test :only babashka.pod-test
|
||||
|
||||
export BABASHKA_SOCKET_REPL_TEST=true
|
||||
lein test :only babashka.impl.socket-repl-test
|
||||
|
|
|
|||
|
|
@ -40,7 +40,10 @@
|
|||
|
||||
(def server-process (volatile! nil))
|
||||
|
||||
(def exec? (System/getenv "BABASHKA_SOCKET_REPL_TEST"))
|
||||
|
||||
(deftest socket-repl-test
|
||||
(when exec?
|
||||
(try
|
||||
(if tu/jvm?
|
||||
(let [ctx (init {:namespaces {'clojure.core.server clojure-core-server}
|
||||
|
|
@ -65,10 +68,12 @@
|
|||
(finally
|
||||
(if tu/jvm?
|
||||
(do (stop-repl!)
|
||||
(vreset! common/ctx nil)
|
||||
(Thread/sleep 100))
|
||||
(p/destroy-tree @server-process)))))
|
||||
(p/destroy-tree @server-process))))))
|
||||
|
||||
(deftest socket-repl-opts-test
|
||||
(when exec?
|
||||
(try
|
||||
(if tu/jvm?
|
||||
(let [ctx (init {:bindings {'*command-line-args*
|
||||
|
|
@ -87,10 +92,12 @@
|
|||
(finally
|
||||
(if tu/jvm?
|
||||
(do (stop-repl!)
|
||||
(vreset! common/ctx nil)
|
||||
(Thread/sleep 100))
|
||||
(p/destroy-tree @server-process)))))
|
||||
(p/destroy-tree @server-process))))))
|
||||
|
||||
(deftest socket-prepl-test
|
||||
(when exec?
|
||||
(try
|
||||
(if tu/jvm?
|
||||
(let [ctx (init {:bindings {'*command-line-args*
|
||||
|
|
@ -113,8 +120,9 @@
|
|||
(finally
|
||||
(if tu/jvm?
|
||||
(do (stop-repl!)
|
||||
(vreset! common/ctx nil)
|
||||
(Thread/sleep 100))
|
||||
(p/destroy-tree @server-process)))))
|
||||
(p/destroy-tree @server-process))))))
|
||||
|
||||
;;;; Scratch
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue