on master help sign in
Simplified a test
72dff48Michael
warp/test/main.hs+2−2
@@ -184,14 +184,14 @@ main = hspecX $ do
184 handle <- connectTo "127.0.0.1" $ PortNumber $ fromIntegral port
184 handle <- connectTo "127.0.0.1" $ PortNumber $ fromIntegral port
185 let input = concat $ replicate 2 $
185 let input = concat $ replicate 2 $
186 ["POST / HTTP/1.1\r\nTransfer-Encoding: Chunked\r\n\r\n"] ++
186 ["POST / HTTP/1.1\r\nTransfer-Encoding: Chunked\r\n\r\n"] ++
187− (replicate 500 "5\r\n12345\r\n") ++
187+ (replicate 50 "5\r\n12345\r\n") ++
188 ["0\r\n"]
188 ["0\r\n"]
189 mapM_ (\bs -> hPutStr handle bs >> hFlush handle) input
189 mapM_ (\bs -> hPutStr handle bs >> hFlush handle) input
190 hClose handle
190 hClose handle
191 threadDelay 1000
191 threadDelay 1000
192 killThread tid
192 killThread tid
193 front <- I.readIORef ifront
193 front <- I.readIORef ifront
194− front [] @?= replicate 2 (S.concat $ replicate 500 "12345")
194+ front [] @?= replicate 2 (S.concat $ replicate 50 "12345")
195 it "in chunks" $ do
195 it "in chunks" $ do
196 ifront <- I.newIORef id
196 ifront <- I.newIORef id
197 port <- getPort
197 port <- getPort