Skip to content

Commit 6d0c415

Browse files
committed
Add few delays in servant-jsaddle tests
Hopefully they will fail less on Travis with these
1 parent 1047510 commit 6d0c415

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

changelog.d/todo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ prs: #1194 #1201 #1198 #1197 #1190 #1188
44
prs: #1183 #1181 #1182 #1175 #1175 #1174
55
prs: #1173 #1171 #1154 #1162 #1157 #1159
66
prs: #1156
7+
prs: #1233

servant-jsaddle/test/Servant/Client/JSaddleSpec.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,18 @@ spec = do
105105
serverApp = pure $ logRequest $ addCors $ serve testApi testServer
106106

107107
Warp.testWithApplication serverApp $ \serverPort -> do
108+
threadDelay $ 500 * 1000
108109

109110
let clientApp :: IO Application
110111
clientApp = WS.jsaddleOr defaultConnectionOptions (action serverPort >> Run.syncPoint) WS.jsaddleApp
111112

112113
Warp.testWithApplication (simpleCors <$> clientApp) $ \clientPort -> do
114+
threadDelay $ 500 * 1000
115+
113116
putStrLn $ "server http://localhost:" ++ show serverPort
114117
putStrLn $ "client http://localhost:" ++ show clientPort
115118
putStrLn $ "google-chrome-stable --headless --disable-gpu --screenshot http://localhost:" ++ show clientPort
116119

117-
-- threadDelay $ 1000 * 1000 * 1000
118120

119121
-- Run headless chrome
120122
-- https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-the-chrome-addon-in-the-headless-mode

0 commit comments

Comments
 (0)