snapframework / snap

Top-level package for the official Snap Framework libraries, includes the snaplets API as well as infrastructure for sessions, auth, and templates.
http://snapframework.com/
BSD 3-Clause "New" or "Revised" License
455 stars 68 forks source link

Tests timeout on slower machines #195

Closed iliastsi closed 5 years ago

iliastsi commented 6 years ago

Hi!

Tests timeout on some slower machines. As an example, see https://buildd.debian.org/status/fetch.php?pkg=haskell-snap&arch=mipsel&ver=1.0.0.2-1&stamp=1509825048&raw=0

Would you consider increasing the default timeout for readRequestBodyHangIssue? On Debian, we use the following patch:

--- a/test/suite/Snap/Snaplet/Test/Tests.hs
+++ b/test/suite/Snap/Snaplet/Test/Tests.hs
@@ -121,7 +121,7 @@ readRequestBodyHangIssue =
     assertReadRqBody =
       do let hdl = readRequestBody 5000 >>= writeLBS
          res <- race
-                (threadDelay 1000000)
+                (threadDelay 100000000)
                 (runHandler Nothing (ST.get "" Map.empty) hdl appInit)
          either (assertFailure . ("readRequestBody timeout" ++) . show)
            (either (assertFailure . show) ST.assertSuccess) res
mightybyte commented 6 years ago

Sorry for the delay on this. Yes, I think that patch would be fine.