Created
June 27, 2012 23:05
-
-
Save skuro/3007467 to your computer and use it in GitHub Desktop.
Hanging test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns envtest | |
| (:use [clojure.test]) | |
| (:require [http.async.client :as http] | |
| [http.async.client.request :as request])) | |
| (def lambdalf-url "http://localhost:9090/lambdalf-webapp") | |
| (def ^:dynamic *client* nil) | |
| (defn- once-fixture [f] | |
| "Configures Logger before test here are executed, and closes AHC after tests are done." | |
| (binding [*client* (http/create-client)] | |
| (try (f) | |
| (finally | |
| (.close *client*))))) | |
| (use-fixtures :once once-fixture) | |
| (deftest basic-authentication | |
| (let [credentials {:user "admin" | |
| :password "admin"} | |
| ; it appears to hang at http/status: | |
| code (http/status (http/GET *client* (str lambdalf-url "/service/index") | |
| :auth credentials | |
| :timeout 100 | |
| :preemptive true))] | |
| (is (= 200 code)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "main" prio=5 tid=103800000 nid=0x100501000 waiting on condition [1004ff000] | |
| java.lang.Thread.State: WAITING (parking) | |
| at sun.misc.Unsafe.park(Native Method) | |
| - parking to wait for <7f349fcf8> (a java.util.concurrent.CountDownLatch$Sync) | |
| at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156) | |
| at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811) | |
| at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969) | |
| at java.util.concHeap | |
| urrent.locks.AbstractQueuedSynchronizer.acquir par new generation total 19136K, used 9520K [7d0000000, 7d14c0000, 7d4000000) | |
| eden space 17024K, 43% used [7d0000000, 7d073c220, 7d10a0000) | |
| from space 2112K, 100% used [7d10a0000, 7d12b0000, 7d12b0000) | |
| eSharedInterruptibly(AbstractQueuedSynchronizer.java:1281) | |
| at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:207) | |
| at clojure.core$promise$reify__6153.deref(core.clj:6292) | |
| at clojure.core$deref.invoke(core.clj:2080) | |
| at http.async.client$safe_get.invoke(client.clj:193) | |
| at http.async.client$status.invoke(client.clj:248) | |
| at envtest$fn__342.invoke(envtest.clj:37) | |
| at clojure.test$test_var$fn__6926.invoke(test.clj:701) | |
| at clojure.test$test_var.invoke(test.clj:701) | |
| at clojure.test$test_all_vars$fn__6930$fn__6937.invoke(test.clj:717) | |
| at clojure.test$default_fixture.invoke(test.clj:671) | |
| at clojure.test$test_all_vars$fn__6930.invoke(test.clj:717) | |
| at envtest$once_fixture.invoke(envtest.clj:28) | |
| at clojure.test$compose_fixtures$fn__6920$fn__6921.invoke(test.clj:678) | |
| at clojure.test$default_fixture.invoke(test.clj:671) | |
| at clojure.test$compose_fixtures$fn__6920.invoke(test.clj:678) | |
| at clojure.test$test_all_vars.invoke(test.clj:713) | |
| at clojure.test$test_ns.invoke(test.clj:736) | |
| at clojure.core$ to space 2112K, 0% usedmap$fn__4087.invoke(core.clj:2434) | |
| at clojure.lang.LazySeq.sval(LazySeq.java:42) | |
| - locked <7f40a02b8> (a clojure.lang.LazySeq) | |
| at clojure.lang.LazySeq.seq(LazySeq.java:60) | |
| - locked <7f40a02b8> (a clojure.lang.LazySeq) | |
| at clojure.lang.Cons.next(Cons.java:39) | |
| at clojure.lang.RT.boundedLength(RT.java:1633) | |
| at clojure.lang.RestFn.applyTo(RestFn.java:130) | |
| at clojure.core$apply.invoke(core.clj:603) | |
| at clojure.test$run_tests.doInvoke(test.clj:751) | |
| at clojure.lang.RestFn.invoke(RestFn.java:408) | |
| at com.theoryinpractise.clojure.testrunner$eval368$fn__373.invoke(run-test2390527729387263583.clj:31) | |
| at com.theoryinpractise.clojure.testrunner$eval368.invoke(run-test2390527729387263583.clj:27) | |
| at clojure.lang.Compiler.eval(Compiler.java:6511) | |
| at clojure.lang.Compiler.load(Compiler.java:6952) | |
| at clojure.lang.Compiler.loadFile(Compiler.java:6912) | |
| at clojure.main$load_script.invoke(main.clj:283) | |
| at clojure.main$script_opt.invoke(main.clj:343) | |
| at clojure.main$main.doInvoke(main.clj:427) | |
| at clojure.lang.RestFn [7d12b0000, 7d12b0000, 7d14c0000) | |
| concurrent mark-sweep generation.invoke(RestFn.java:408) | |
| at clojure.lang.Var.invoke(Var.java:415) | |
| at clojure.lang.AFn.applyToHelper(AFn.java:161) | |
| at clojure.lang.Var.applyTo(Var.java:532) | |
| at clojure.main.main(main.java:37) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment