running lein test crashes phantomjs
dqdinh opened this issue · comments
Hi, I'm trying to run the unit tests but phantomjs crashes before completing. Strangely the tests pass on travis (https://travis-ci.org/r0man/cljs-http)
Do these tests pass on your local system? Any ideas why this is happening?
➜ cljs-http git:(master) ✗ lein version
Leiningen 2.6.1 on Java 1.8.0_45 Java HotSpot(TM) 64-Bit Server VM
➜ cljs-http git:(master) lein test
;; ======================================================================
;; Testing with Phantom:
Testing cljs-http.client-test
FAIL in (test-cancel-channel) (:)
expected: (= resp nil)
actual: (not (= {:status -1, :success false, :body "", :headers {}, :trace-redirects ["http://google.com" "http://google.com"], :error-code :exception, :error-text "Error: NETWORK_ERR: XMLHttpRequest Exception 101"} nil))
FAIL in (http-error-code) (:)
expected: (= :no-error (:error-code (<! success-req)))
actual: (not (= :no-error :exception))
FAIL in (http-error-code) (:)
expected: (= :timeout (:error-code (<! timeout-req)))
actual: (not (= :timeout :exception))
TypeError: Type error
phantomjs://code/phantom5315752302497335760.js:74 in onError
Subprocess failed
@dqdinh The tests used to pass. They fail on my local machine as well now. I'm running phantomjs 2.1.1
. I think the tests assert on some phantomjs internals that have changed now. I think this needs to be changed.
I just updated the dependencies and run the tests on Travis. They passed, so this is related to some changes on phantomjs. I don't have time to work on this at the moment. Patch that works on all phantomjs versions welcome ... ;)
Still an issue here with phantomjs-2.1.1+dfsg-2 on Ubuntu 17.10. :(