Add few delays in servant-jsaddle tests
Hopefully they will fail less on Travis with these
This commit is contained in:
parent
1047510141
commit
6d0c415377
2 changed files with 4 additions and 1 deletions
|
@ -4,3 +4,4 @@ prs: #1194 #1201 #1198 #1197 #1190 #1188
|
||||||
prs: #1183 #1181 #1182 #1175 #1175 #1174
|
prs: #1183 #1181 #1182 #1175 #1175 #1174
|
||||||
prs: #1173 #1171 #1154 #1162 #1157 #1159
|
prs: #1173 #1171 #1154 #1162 #1157 #1159
|
||||||
prs: #1156
|
prs: #1156
|
||||||
|
prs: #1233
|
||||||
|
|
|
@ -105,16 +105,18 @@ spec = do
|
||||||
serverApp = pure $ logRequest $ addCors $ serve testApi testServer
|
serverApp = pure $ logRequest $ addCors $ serve testApi testServer
|
||||||
|
|
||||||
Warp.testWithApplication serverApp $ \serverPort -> do
|
Warp.testWithApplication serverApp $ \serverPort -> do
|
||||||
|
threadDelay $ 500 * 1000
|
||||||
|
|
||||||
let clientApp :: IO Application
|
let clientApp :: IO Application
|
||||||
clientApp = WS.jsaddleOr defaultConnectionOptions (action serverPort >> Run.syncPoint) WS.jsaddleApp
|
clientApp = WS.jsaddleOr defaultConnectionOptions (action serverPort >> Run.syncPoint) WS.jsaddleApp
|
||||||
|
|
||||||
Warp.testWithApplication (simpleCors <$> clientApp) $ \clientPort -> do
|
Warp.testWithApplication (simpleCors <$> clientApp) $ \clientPort -> do
|
||||||
|
threadDelay $ 500 * 1000
|
||||||
|
|
||||||
putStrLn $ "server http://localhost:" ++ show serverPort
|
putStrLn $ "server http://localhost:" ++ show serverPort
|
||||||
putStrLn $ "client http://localhost:" ++ show clientPort
|
putStrLn $ "client http://localhost:" ++ show clientPort
|
||||||
putStrLn $ "google-chrome-stable --headless --disable-gpu --screenshot http://localhost:" ++ show clientPort
|
putStrLn $ "google-chrome-stable --headless --disable-gpu --screenshot http://localhost:" ++ show clientPort
|
||||||
|
|
||||||
-- threadDelay $ 1000 * 1000 * 1000
|
|
||||||
|
|
||||||
-- Run headless chrome
|
-- Run headless chrome
|
||||||
-- https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-the-chrome-addon-in-the-headless-mode
|
-- https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-the-chrome-addon-in-the-headless-mode
|
||||||
|
|
Loading…
Reference in a new issue