Skip to content

Instantly share code, notes, and snippets.

@imalsogreg
Created July 28, 2014 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imalsogreg/77cd68ea28c44d2c3af3 to your computer and use it in GitHub Desktop.
Save imalsogreg/77cd68ea28c44d2c3af3 to your computer and use it in GitHub Desktop.
Issue 200
------------------------------------------------------------------------------
readRequestBodyHangIssue :: Test
readRequestBodyHangIssue =
testCase "readRequestBody doesn't hang" assertReadRqBody
where
assertReadRqBody =
do let hdl = readRequestBody 5000 >>= writeLBS
res <- race
(threadDelay 1000000)
(runHandler Nothing (ST.get "" Map.empty) hdl appInit)
either (assertFailure . ("readRequestBody timeout" ++) . show)
(either (assertFailure . show) ST.assertSuccess) res
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment