@@ -23,6 +23,7 @@ import Streamly
2323import Streamly.Prelude ((.:), nil)
2424import qualified Streamly.Prelude as S
2525
26+-- Coverage build takes too long with default number of tests
2627maxTestCount :: Int
2728#ifdef DEVBUILD
2829maxTestCount = 100
@@ -53,7 +54,7 @@ constructWithReplicateM
5354 -> Int
5455 -> Word8
5556 -> Property
56−constructWithReplicateM op thr buf len =
57+constructWithReplicateM op thr buf len = withMaxSuccess maxTestCount $
5758 monadicIO $ do
5859 let x = return (1 :: Int)
5960 stream <- run $ (S.toList . op) (maxThreads thr $ maxBuffer buf $
@@ -246,6 +247,7 @@ transformCombineFromList
246247 -> [Int]
247248 -> Property
248249transformCombineFromList constr eq listOp t op a b c =
250+ withMaxSuccess maxTestCount $
249251 monadicIO $ do
250252 stream <- run ((S.toList . t) $
251253 constr a <> op (constr b <> constr c))
@@ -353,17 +355,17 @@ concurrentOps
353355 -> ([Word8] -> [Word8] -> Bool)
354356 -> Spec
355357concurrentOps constr desc t eq = do
356− prop (desc ++ " fromFoldableM") $ withMaxSuccess maxTestCount $
357− concurrentFromFoldable eq t
358− prop (desc ++ " unfoldrM") $ withMaxSuccess maxTestCount $
359− concurrentUnfoldrM eq t
358+ let prop1 d p = prop d $ withMaxSuccess maxTestCount p
359+
360+ prop1 (desc ++ " fromFoldableM") $ concurrentFromFoldable eq t
361+ prop1 (desc ++ " unfoldrM") $ concurrentUnfoldrM eq t
360362 -- we pass it the length of the stream n and an mvar mv.
361363 -- The stream is [0..n]. The threads communicate in such a way that the
362364 -- actions coming first in the stream are dependent on the last action. So
363365 -- if the stream is not processed concurrently it will block forever.
364366 -- Note that if the size of the stream is bigger than the thread limit
365367 -- then it will block even if it is concurrent.
366− prop (desc ++ " mapM") $ withMaxSuccess maxTestCount $
368+ prop1 (desc ++ " mapM") $
367369 concurrentMapM constr eq $ \n mv stream ->
368370 t $ S.mapM (mvarSequenceOp mv n) stream
369371
@@ -600,7 +602,7 @@ monadBind constr t eq (a, b) = withMaxSuccess maxTestCount $
600602 equals eq stream list
601603
602604constructionConcurrent :: Int -> Int -> Spec
603−constructionConcurrent thr buf =
605+constructionConcurrent thr buf = do
604606 describe (" threads = " ++ show thr ++ "buffer = " ++ show buf) $ do
605607 prop "asyncly replicateM" $ constructWithReplicateM asyncly thr buf
606608 prop "wAsyncly replicateM" $ constructWithReplicateM wAsyncly thr buf