git.iko.soy/typeable/servant
on master help sign in
Disable flawed streams in constant memory test
27768d5Oleg Grenrus
servant-client/test/Servant/StreamSpec.hs+2
@@ -130,6 +130,7 @@ streamSpec = beforeAll (CS.startWaiApp server) $ afterAll CS.endWaiApp $ do
130 jrb = Just (Right bob)
130 jrb = Just (Right bob)
131 runResultStream res `shouldReturn` (jra, jrb, jra, Nothing)
131 runResultStream res `shouldReturn` (jra, jrb, jra, Nothing)
132
132
133+{-
133 it "streams in constant memory" $ \(_, baseUrl) -> do
134 it "streams in constant memory" $ \(_, baseUrl) -> do
134 Right (ResultStream res) <- runClient getGetALot baseUrl
135 Right (ResultStream res) <- runClient getGetALot baseUrl
135 let consumeNChunks n = replicateM_ n (res void)
136 let consumeNChunks n = replicateM_ n (res void)
@@ -140,6 +141,7 @@ streamSpec = beforeAll (CS.startWaiApp server) $ afterAll CS.endWaiApp $ do
140 memUsed <- currentBytesUsed <$> getGCStats
141 memUsed <- currentBytesUsed <$> getGCStats
141#endif
142#endif
142 memUsed `shouldSatisfy` (< megabytes 22)
143 memUsed `shouldSatisfy` (< megabytes 22)
144+-}
143
145
144megabytes :: Num a => a -> a
146megabytes :: Num a => a -> a
145megabytes n = n * (1000 ^ (2 :: Int))
147megabytes n = n * (1000 ^ (2 :: Int))