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
|
export BABASHKA_POD_TEST=true
|
||||||
lein test :only babashka.pod-test
|
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 server-process (volatile! nil))
|
||||||
|
|
||||||
|
(def exec? (System/getenv "BABASHKA_SOCKET_REPL_TEST"))
|
||||||
|
|
||||||
(deftest socket-repl-test
|
(deftest socket-repl-test
|
||||||
|
(when exec?
|
||||||
(try
|
(try
|
||||||
(if tu/jvm?
|
(if tu/jvm?
|
||||||
(let [ctx (init {:namespaces {'clojure.core.server clojure-core-server}
|
(let [ctx (init {:namespaces {'clojure.core.server clojure-core-server}
|
||||||
|
|
@ -65,10 +68,12 @@
|
||||||
(finally
|
(finally
|
||||||
(if tu/jvm?
|
(if tu/jvm?
|
||||||
(do (stop-repl!)
|
(do (stop-repl!)
|
||||||
|
(vreset! common/ctx nil)
|
||||||
(Thread/sleep 100))
|
(Thread/sleep 100))
|
||||||
(p/destroy-tree @server-process)))))
|
(p/destroy-tree @server-process))))))
|
||||||
|
|
||||||
(deftest socket-repl-opts-test
|
(deftest socket-repl-opts-test
|
||||||
|
(when exec?
|
||||||
(try
|
(try
|
||||||
(if tu/jvm?
|
(if tu/jvm?
|
||||||
(let [ctx (init {:bindings {'*command-line-args*
|
(let [ctx (init {:bindings {'*command-line-args*
|
||||||
|
|
@ -87,10 +92,12 @@
|
||||||
(finally
|
(finally
|
||||||
(if tu/jvm?
|
(if tu/jvm?
|
||||||
(do (stop-repl!)
|
(do (stop-repl!)
|
||||||
|
(vreset! common/ctx nil)
|
||||||
(Thread/sleep 100))
|
(Thread/sleep 100))
|
||||||
(p/destroy-tree @server-process)))))
|
(p/destroy-tree @server-process))))))
|
||||||
|
|
||||||
(deftest socket-prepl-test
|
(deftest socket-prepl-test
|
||||||
|
(when exec?
|
||||||
(try
|
(try
|
||||||
(if tu/jvm?
|
(if tu/jvm?
|
||||||
(let [ctx (init {:bindings {'*command-line-args*
|
(let [ctx (init {:bindings {'*command-line-args*
|
||||||
|
|
@ -113,8 +120,9 @@
|
||||||
(finally
|
(finally
|
||||||
(if tu/jvm?
|
(if tu/jvm?
|
||||||
(do (stop-repl!)
|
(do (stop-repl!)
|
||||||
|
(vreset! common/ctx nil)
|
||||||
(Thread/sleep 100))
|
(Thread/sleep 100))
|
||||||
(p/destroy-tree @server-process)))))
|
(p/destroy-tree @server-process))))))
|
||||||
|
|
||||||
;;;; Scratch
|
;;;; Scratch
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue