Permalink
Browse files

eliminate spurious client disconnection stacktrace in tests, fixes NR…

…EPL-10
  • Loading branch information...
cemerick committed Oct 12, 2012
1 parent 7105dce commit 2d90bdd4fe14298bbfcaab52ecdea48781c71604
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/test/clojure/clojure/tools/nrepl_test.clj
@@ -207,7 +207,12 @@
(is (= [true] (repl-values session "halted?")))))
(def-repl-test read-timeout
- (is (nil? (repl-values timeout-session "(Thread/sleep 1100)"))))
+ (is (nil? (repl-values timeout-session "(Thread/sleep 1100) :ok")))
+ ; just getting the values off of the wire so the server side doesn't
+ ; toss a spurious stack trace when the client disconnects
+ (is (= [nil :ok] (->> (repeatedly #(transport/recv transport 500))
+ (take-while (complement nil?))
+ response-values))))
(def-repl-test concurrent-message-handling
(testing "multiple messages can be handled on the same connection concurrently"

0 comments on commit 2d90bdd

Please sign in to comment.