git.iko.soy/typeable/servant
on master help sign in
Add few delays in servant-jsaddle tests
6d0c415Oleg Grenrus
changelog.d/todo+1
@@ -4,3 +4,4 @@ prs: #1194 #1201 #1198 #1197 #1190 #1188
4prs: #1183 #1181 #1182 #1175 #1175 #1174
4prs: #1183 #1181 #1182 #1175 #1175 #1174
5prs: #1173 #1171 #1154 #1162 #1157 #1159
5prs: #1173 #1171 #1154 #1162 #1157 #1159
6prs: #1156
6prs: #1156
7+prs: #1233
servant-jsaddle/test/Servant/Client/JSaddleSpec.hs+3−1
@@ -105,16 +105,18 @@ spec = do
105 serverApp = pure $ logRequest $ addCors $ serve testApi testServer
105 serverApp = pure $ logRequest $ addCors $ serve testApi testServer
106
106
107 Warp.testWithApplication serverApp $ \serverPort -> do
107 Warp.testWithApplication serverApp $ \serverPort -> do
108+ threadDelay $ 500 * 1000
108
109
109 let clientApp :: IO Application
110 let clientApp :: IO Application
110 clientApp = WS.jsaddleOr defaultConnectionOptions (action serverPort >> Run.syncPoint) WS.jsaddleApp
111 clientApp = WS.jsaddleOr defaultConnectionOptions (action serverPort >> Run.syncPoint) WS.jsaddleApp
111
112
112 Warp.testWithApplication (simpleCors <$> clientApp) $ \clientPort -> do
113 Warp.testWithApplication (simpleCors <$> clientApp) $ \clientPort -> do
114+ threadDelay $ 500 * 1000
115+
113 putStrLn $ "server http://localhost:" ++ show serverPort
116 putStrLn $ "server http://localhost:" ++ show serverPort
114 putStrLn $ "client http://localhost:" ++ show clientPort
117 putStrLn $ "client http://localhost:" ++ show clientPort
115 putStrLn $ "google-chrome-stable --headless --disable-gpu --screenshot http://localhost:" ++ show clientPort
118 putStrLn $ "google-chrome-stable --headless --disable-gpu --screenshot http://localhost:" ++ show clientPort
116
119
117− -- threadDelay $ 1000 * 1000 * 1000
118
120
119 -- Run headless chrome
121 -- Run headless chrome
120 -- https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-the-chrome-addon-in-the-headless-mode
122 -- https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-the-chrome-addon-in-the-headless-mode