Created
July 28, 2014 21:11
-
-
Save imalsogreg/77cd68ea28c44d2c3af3 to your computer and use it in GitHub Desktop.
Issue 200
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
------------------------------------------------------------------------------ | |
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