We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4b7662 commit 1920301Copy full SHA for 1920301
test/Spec.hs
@@ -1,6 +1,7 @@
1
{-# LANGUAGE DeriveAnyClass #-}
2
{-# LANGUAGE DerivingStrategies #-}
3
{-# LANGUAGE FlexibleContexts #-}
4
+{-# LANGUAGE CPP #-}
5
6
module Main (main) where
7
@@ -25,7 +26,12 @@ main :: IO ()
25
26
main = do
27
hSetEncoding stdout utf8
28
hSetEncoding stderr utf8
- dbPool <- Pool.createPool (Sql.connectPostgreSQL connectionSettings) Sql.close 10 5 10
29
+ dbPool <-
30
+#if MIN_VERSION_resource_pool(0,4,0)
31
+ Pool.newPool (Pool.defaultPoolConfig ((Sql.connectPostgreSQL connectionSettings)) Sql.close 1 10)
32
+#else
33
+ Pool.createPool (Sql.connectPostgreSQL connectionSettings) Sql.close 10 5 10
34
+#endif
35
hspec $ unitTests dbPool
36
37
unitTests :: Pool.Pool Sql.Connection -> Spec
0 commit comments