on master help sign in
Disable flawed streams in constant memory test
f536c90Oleg Grenrus
servant-client/test/Servant/StreamSpec.hs+2
@@ -135,6 +135,7 @@ streamSpec = beforeAll (CS.startWaiApp server) $ afterAll CS.endWaiApp $ do
135 jrb = Just (Right bob)
135 jrb = Just (Right bob)
136 testRunResultStream res `shouldReturn` (jra, jrb, jra, Nothing)
136 testRunResultStream res `shouldReturn` (jra, jrb, jra, Nothing)
137
137
138+{-
138 it "streams in constant memory" $ \(_, baseUrl) -> do
139 it "streams in constant memory" $ \(_, baseUrl) -> do
139 Right (ResultStream res) <- runClient getGetALot baseUrl
140 Right (ResultStream res) <- runClient getGetALot baseUrl
140 let consumeNChunks n = replicateM_ n (res void)
141 let consumeNChunks n = replicateM_ n (res void)
@@ -145,6 +146,7 @@ streamSpec = beforeAll (CS.startWaiApp server) $ afterAll CS.endWaiApp $ do
145 memUsed <- currentBytesUsed <$> getGCStats
146 memUsed <- currentBytesUsed <$> getGCStats
146#endif
147#endif
147 memUsed `shouldSatisfy` (< megabytes 22)
148 memUsed `shouldSatisfy` (< megabytes 22)
149+-}
148
150
149megabytes :: Num a => a -> a
151megabytes :: Num a => a -> a
150megabytes n = n * (1000 ^ (2 :: Int))
152megabytes n = n * (1000 ^ (2 :: Int))