From ef7a743c600dbc6ec06372bf69c67049d2424b04 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 11 Feb 2021 08:53:09 +0100 Subject: [PATCH] test: enusre arc roundtrips --- test/Handler/Utils/FilesSpec.hs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/test/Handler/Utils/FilesSpec.hs b/test/Handler/Utils/FilesSpec.hs index be8b2b3a3..cdd3f181c 100644 --- a/test/Handler/Utils/FilesSpec.hs +++ b/test/Handler/Utils/FilesSpec.hs @@ -42,11 +42,12 @@ spec = withApp . describe "File handling" $ do suppliedContent <- runConduit $ transPipe generalize fileContentContent .| C.sinkLazy - readContent <- runConduit $ sourceFileMinio fileReferenceContentContent - .| C.takeE (succ $ olength suppliedContent) - .| C.sinkLazy + for_ [1..10] $ \_i -> do + readContent <- runConduit $ sourceFileMinio fileReferenceContentContent + .| C.takeE (succ $ olength suppliedContent) + .| C.sinkLazy - liftIO $ readContent `shouldBe` suppliedContent + liftIO $ readContent `shouldBe` suppliedContent describe "DB" $ do modifyMaxSuccess (`div` 10) . it "roundtrips" $ \(tSite, _) -> property $ do fileContentContent <- arbitrary @@ -61,9 +62,10 @@ spec = withApp . describe "File handling" $ do suppliedContent <- runConduit $ transPipe generalize fileContentContent .| C.sinkLazy - readContent <- runDB . runConduit - $ sourceFileDB fRef' - .| C.takeE (succ $ olength suppliedContent) - .| C.sinkLazy + for_ [1..10] $ \_i -> do + readContent <- runDB . runConduit + $ sourceFileDB fRef' + .| C.takeE (succ $ olength suppliedContent) + .| C.sinkLazy - liftIO $ readContent `shouldBe` suppliedContent + liftIO $ readContent `shouldBe` suppliedContent