[#166] unit test: wait/wait-for-port closes connection
This commit is contained in:
parent
58568c0b7a
commit
59748a5ce0
1 changed files with 8 additions and 1 deletions
|
|
@ -190,7 +190,14 @@
|
|||
(wait/wait-for-port \"127.0.0.1\" 1777)
|
||||
(.destroy ws)
|
||||
(.waitFor ws)
|
||||
(wait/wait-for-port \"localhost\" 1777 {:default :timed-out :timeout 50})"))))
|
||||
(wait/wait-for-port \"localhost\" 1777 {:default :timed-out :timeout 50})")))
|
||||
(is (int? (bb nil "
|
||||
(require '[babashka.wait :as wait])
|
||||
(def ws (-> (ProcessBuilder. [\"python\" \"-m\" \"SimpleHTTPServer\" \"1777\"]) (.start)))
|
||||
(wait/wait-for-port \"localhost\" 1777)
|
||||
(slurp \"http://localhost:1777\")
|
||||
(.destroy ws)
|
||||
(.waitFor ws)"))))
|
||||
|
||||
(deftest wait-for-path-test
|
||||
(let [temp-dir-path (System/getProperty "java.io.tmpdir")]
|
||||
|
|
|
|||
Loading…
Reference in a new issue