test.hs: thread blocked indefinitely in an MVar operation
Closed this issue · 3 comments
zhiwei@zhiwei-Lenovo-Rescuer-15ISK:~/Documents/haskell projects/shadowsocks-haskell$ runhaskell test.hs
Cases: 4 Tried: 4 Errors: 0 Failures: 0
dist/package.conf.inplace/package.cache:
removeDirectoryRecursive:removeContentsRecursive:removePathRecursive:removeLink:
does not exist (No such file or directory)
test.hs: fd:12: Data.ByteString.hGetLine: end of file
test.hs: thread blocked indefinitely in an MVar operation
I don't have cabal
on my computer, but if I make following changes to test.hs
(_, Just p1_out, _, p1_hdl) <-
- createProcess (shell "cabal run ssserver") { std_out = CreatePipe }
+ createProcess (shell "stack exec -- ssserver") { std_out = CreatePipe }
(_, Just p2_out, _, p2_hdl) <-
- createProcess (shell "cabal run sslocal") { std_out = CreatePipe }
+ createProcess (shell "stack exec -- sslocal") { std_out = CreatePipe }
The tests pass.
I don't know where does removeDirectoryRecursive:removeContentsRecursive:removePathRecursive:removeLink: does not exist (No such file or directory)
come from
BTW, I run the tests with stack test
What the tests do is basically start both ssserver
and sslocal
, then use curl
to send a request to sslocal
to see if it works. You can start ssserver
and sslocal
manually, then test with curl
or browser.
cabal test
should work , tested with v1.20180408.