From 5b31be38279f1cf99ebc6c7bc541ba5bcece8ea4 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Thu, 14 Sep 2023 12:03:35 -0400 Subject: [PATCH] Initialize the underlying library before the test suite begins --- haskell/test/FECTest.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/haskell/test/FECTest.hs b/haskell/test/FECTest.hs index 0f0954e..f486bb2 100644 --- a/haskell/test/FECTest.hs +++ b/haskell/test/FECTest.hs @@ -112,8 +112,10 @@ prop_primary_copies (Params _ tot) primary = property $ do secondary = FEC.encode fec [BL.toStrict primary] main :: IO () -main = hspec $ - parallel $ do +main = do + -- Be sure to do the required zfec initialization first. + FEC.initialize + hspec . parallel $ do describe "encode" $ do -- This test originally caught a bug in multi-threaded -- initialization of the C library. Since it is in the