Skip to content

Commit ad3952c

Browse files
Use a java.lang.Object to test non-serialisable
1 parent 0bcc10b commit ad3952c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/lsp4clj/io_chan_test.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@
7070
(testing "when JSON serialisation fails"
7171
(let [output-stream (java.io.ByteArrayOutputStream.)
7272
output-ch (io-chan/output-stream->output-chan output-stream)]
73-
(async/>!! output-ch {:not-serializable output-stream})
74-
(Thread/sleep 200)
73+
(async/>!! output-ch {:not-serializable (Object.)})
74+
(Thread/sleep 50)
7575
(is (false? (async/put! output-ch {:test "should be closed"})))))
7676
(testing "when an I/O exception occurs"
7777
(let [output-stream (error-output-stream)
7878
output-ch (io-chan/output-stream->output-chan output-stream)]
7979
(async/>!! output-ch {:test "ok"})
80-
(Thread/sleep 200)
80+
(Thread/sleep 50)
8181
(is (false? (async/put! output-ch {:test "should be closed"}))))))
8282

8383
(deftest input-stream-should-kebab-case-input

0 commit comments

Comments
 (0)