@@ -10,7 +10,6 @@ import qualified Data.Text as T
10
10
import qualified Network.Wai as W
11
11
import qualified Network.Wai.Handler.Warp as W
12
12
13
- import Control.Concurrent (threadDelay )
14
13
import Control.Monad (join )
15
14
import Control.Monad.IO.Class
16
15
import Data.Aeson
@@ -33,7 +32,6 @@ spec = before getSettingsAndItemRef $
33
32
(req GET url NoReqBody bsResponse $ port warpPort)
34
33
responseStatusCode response `shouldBe` 200
35
34
responseBody response `shouldBe` " OK"
36
- threadDelay 500
37
35
readIORef itemRef `shouldReturn` Nothing
38
36
39
37
context " when the response status code is not 200" $
@@ -44,7 +42,6 @@ spec = before getSettingsAndItemRef $
44
42
(defaultHttpConfig { httpConfigCheckResponse = \ _ _ _ -> Nothing })
45
43
(req GET url NoReqBody bsResponse $ port warpPort)
46
44
response `shouldBe` " Something went wrong"
47
- threadDelay 500
48
45
let portAsText = T. pack $ show warpPort
49
46
join . fmap itemRequest <$> readIORef itemRef `shouldReturn` Just
50
47
( Request
@@ -75,7 +72,7 @@ withApp
75
72
-> IO a
76
73
withApp f (settings, itemRef) = do
77
74
let waiSettings = W. setOnException
78
- (rollbarOnExceptionWith (createItemFake itemRef) settings)
75
+ (rollbarOnExceptionWith id (createItemFake itemRef) settings)
79
76
W. defaultSettings
80
77
W. withApplicationSettings waiSettings (return app) $ f itemRef
81
78
0 commit comments