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