on master help sign in
Fix tests under dev flag.
10b03bfPranay Sashank
test/Streamly/Test/Prelude/Rate.hs+1−1
@@ -7,7 +7,7 @@
7-- Stability : experimental
7-- Stability : experimental
8-- Portability : GHC
8-- Portability : GHC
9
9
10−module Streamly.Test.Prelude.MaxRate where
10+module Streamly.Test.Prelude.Rate where
11
11
12import qualified Streamly.Prelude as S
12import qualified Streamly.Prelude as S
13
13
test/Streamly/Test/Prelude/Serial.hs+9−9
@@ -427,20 +427,20 @@ checkTakeDropTime (mt0, mt1) = do
427 return r
427 return r
428
428
429#ifdef DEVBUILD
429#ifdef DEVBUILD
430−testTakeByTime :: IO Bool
430+testTakeInterval :: IO Bool
431−testTakeByTime = do
431+testTakeInterval = do
432 r <-
432 r <-
433− S.fold ((,) <$> FL.head <*> FL.last)
433+ S.fold (FL.tee FL.head FL.last)
434− $ IS.takeByTime takeDropTime
434+ $ IS.takeInterval takeDropTime
435 $ S.repeatM (threadDelay 1000 >> getTime Monotonic)
435 $ S.repeatM (threadDelay 1000 >> getTime Monotonic)
436 checkTakeDropTime r
436 checkTakeDropTime r
437
437
438−testDropByTime :: IO Bool
438+testDropInterval :: IO Bool
439−testDropByTime = do
439+testDropInterval = do
440 t0 <- getTime Monotonic
440 t0 <- getTime Monotonic
441 mt1 <-
441 mt1 <-
442 S.head
442 S.head
443− $ IS.dropByTime takeDropTime
443+ $ IS.dropInterval takeDropTime
444 $ S.repeatM (threadDelay 1000 >> getTime Monotonic)
444 $ S.repeatM (threadDelay 1000 >> getTime Monotonic)
445 checkTakeDropTime (Just t0, mt1)
445 checkTakeDropTime (Just t0, mt1)
446#endif
446#endif
@@ -633,8 +633,8 @@ main = hspec
633
633
634#ifdef DEVBUILD
634#ifdef DEVBUILD
635 describe "Filtering" $ do
635 describe "Filtering" $ do
636− it "takeByTime" (testTakeByTime `shouldReturn` True)
636+ it "takeInterval" (testTakeInterval `shouldReturn` True)
637− it "dropByTime" (testDropByTime `shouldReturn` True)
637+ it "dropInterval" (testDropInterval `shouldReturn` True)
638#endif
638#endif
639
639
640 describe "Stream group and split operations" $ do
640 describe "Stream group and split operations" $ do
test/lib/Streamly/Test/Prelude/Common.hs+2−2
@@ -1456,7 +1456,7 @@ bracketPartialStreamProp t vec =
1456 (S.fromList vec))
1456 (S.fromList vec))
1457 run $ do
1457 run $ do
1458 performMajorGC
1458 performMajorGC
1459− threadDelay 10000
1459+ threadDelay 1000000
1460 refValue <- run $ readIORef ioRef
1460 refValue <- run $ readIORef ioRef
1461 when (refValue /= 0 && refValue /= 3) $
1461 when (refValue /= 0 && refValue /= 3) $
1462 error $ "refValue == " ++ show refValue
1462 error $ "refValue == " ++ show refValue
@@ -1516,7 +1516,7 @@ finallyPartialStreamProp t vec =
1516 (S.fromList vec))
1516 (S.fromList vec))
1517 run $ do
1517 run $ do
1518 performMajorGC
1518 performMajorGC
1519− threadDelay 10000
1519+ threadDelay 100000
1520 refValue <- run $ readIORef ioRef
1520 refValue <- run $ readIORef ioRef
1521 when (refValue /= 0 && refValue /= 2) $
1521 when (refValue /= 0 && refValue /= 2) $
1522 error $ "refValue == " ++ show refValue
1522 error $ "refValue == " ++ show refValue
test/streamly-tests.cabal+1
@@ -179,6 +179,7 @@ common always-optimized
179 -fdicts-strict
179 -fdicts-strict
180 -fmax-worker-args=16
180 -fmax-worker-args=16
181 -fspec-constr-recursive=16
181 -fspec-constr-recursive=16
182+ -rtsopts
182 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
183 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
183 ghc-options: -fplugin Fusion.Plugin
184 ghc-options: -fplugin Fusion.Plugin
184
185