Skip to content

Commit d85ba64

Browse files
committed
relax cacheTTL delay in testing, makes it larger for CI & windows.
1 parent cd5b85c commit d85ba64

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/core/test/unit/Cardano/Pool/MetadataSpec.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ spec = describe "Metadata - MockServer" $ do
138138

139139
around (withMockServer inMemoryCache)
140140
$ it "Cache metadata when called twice within the TTL"
141-
$ \mkClient -> withMaxSuccess 10 $ property $ \pid -> monadicIO $ do
141+
$ \mkClient -> withMaxSuccess 4 $ property $ \pid -> monadicIO $ do
142142
(logs, _) <- run $ captureLogging $ \tr -> do
143143
let Client{getStakePoolMetadata} = mkClient tr
144144
void $ getStakePoolMetadata pid
@@ -149,7 +149,7 @@ spec = describe "Metadata - MockServer" $ do
149149

150150
around (withMockServer inMemoryCache)
151151
$ it "Fetch them again when fetching outside of the TTL"
152-
$ \mkClient -> withMaxSuccess 10 $ property $ \pid -> monadicIO $ do
152+
$ \mkClient -> withMaxSuccess 4 $ property $ \pid -> monadicIO $ do
153153
(logs, _) <- run $ captureLogging $ \tr -> do
154154
let Client{getStakePoolMetadata} = mkClient tr
155155
void $ getStakePoolMetadata pid
@@ -172,9 +172,9 @@ spec = describe "Metadata - MockServer" $ do
172172
-- Mock Storage
173173
--
174174

175-
-- | A default value for the cache, 10ms.
175+
-- | A default value for the cache, 1s
176176
defaultCacheTTL :: NominalDiffTime
177-
defaultCacheTTL = 0.01
177+
defaultCacheTTL = 1
178178

179179
-- | Default dummy caching, callbacks are NoOps.
180180
noCache :: IO (ClientCallbacks IO)

0 commit comments

Comments
 (0)