Add few delays in servant-jsaddle tests

Hopefully they will fail less on Travis with these
This commit is contained in:
Oleg Grenrus 2019-10-01 13:49:25 +03:00
parent 1047510141
commit 6d0c415377
2 changed files with 4 additions and 1 deletions

View File

@ -4,3 +4,4 @@ prs: #1194 #1201 #1198 #1197 #1190 #1188
prs: #1183 #1181 #1182 #1175 #1175 #1174
prs: #1173 #1171 #1154 #1162 #1157 #1159
prs: #1156
prs: #1233

View File

@ -105,16 +105,18 @@ spec = do
serverApp = pure $ logRequest $ addCors $ serve testApi testServer
Warp.testWithApplication serverApp $ \serverPort -> do
threadDelay $ 500 * 1000
let clientApp :: IO Application
clientApp = WS.jsaddleOr defaultConnectionOptions (action serverPort >> Run.syncPoint) WS.jsaddleApp
Warp.testWithApplication (simpleCors <$> clientApp) $ \clientPort -> do
threadDelay $ 500 * 1000
putStrLn $ "server http://localhost:" ++ show serverPort
putStrLn $ "client http://localhost:" ++ show clientPort
putStrLn $ "google-chrome-stable --headless --disable-gpu --screenshot http://localhost:" ++ show clientPort
-- threadDelay $ 1000 * 1000 * 1000
-- Run headless chrome
-- https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-the-chrome-addon-in-the-headless-mode