Give more leeway to Travis.
This commit is contained in:
parent
64dc7f9228
commit
203c94cf1e
@ -93,9 +93,13 @@ main = hspec $ parallel $ do
|
|||||||
let checkEmptySession (sessionMap, SaveSessionToken msession time) = do
|
let checkEmptySession (sessionMap, SaveSessionToken msession time) = do
|
||||||
-- Saved time is close to now, session map is empty,
|
-- Saved time is close to now, session map is empty,
|
||||||
-- there's no reference to an existing session.
|
-- there's no reference to an existing session.
|
||||||
let point1 = 0.1 {- second -} :: Double
|
--
|
||||||
|
-- We used to use 0.1 seconds, but Travis
|
||||||
|
-- intermittently had troubles with it, e.g.:
|
||||||
|
-- <https://travis-ci.org/yesodweb/serversession/jobs/67062266>
|
||||||
|
let closeEnough = 2 {- seconds -} :: Double
|
||||||
now <- TI.getCurrentTime
|
now <- TI.getCurrentTime
|
||||||
abs (realToFrac $ TI.diffUTCTime now time) `shouldSatisfy` (< point1)
|
abs (realToFrac $ TI.diffUTCTime now time) `shouldSatisfy` (< closeEnough)
|
||||||
sessionMap `shouldBe` TNTSessionData
|
sessionMap `shouldBe` TNTSessionData
|
||||||
msession `shouldSatisfy` isNothing
|
msession `shouldSatisfy` isNothing
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user