Skip to content

Commit f270fd5

Browse files
committed
block-fetch tests: use === over ==
1 parent 6ea5ce1 commit f270fd5

File tree

2 files changed

+11
-11
lines changed
  • ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/BlockFetch

2 files changed

+11
-11
lines changed

ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/BlockFetch/Examples.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ blockFetchClientMap ranges = BlockFetchClient $ do
7373
atomically $ do
7474
x <- readTVar donevar
7575
unless (x <= 0) retry
76-
SendMsgClientDone <$> atomically (readTVar var)
76+
SendMsgClientDone <$> readTVarIO var
7777

7878
goBlockFetch donevar var (r : rs) response =
7979
return $ SendMsgRequestRange r response (BlockFetchClient $ goBlockFetch donevar var rs response)

ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/BlockFetch/Test.hs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -205,23 +205,23 @@ connect_pipelined client chain cs = do
205205
-- | With a client with maximum pipelining we get all requests followed by
206206
-- all responses.
207207
--
208-
prop_connect_pipelined1 :: TestChainAndPoints -> [Bool] -> Bool
208+
prop_connect_pipelined1 :: TestChainAndPoints -> [Bool] -> Property
209209
prop_connect_pipelined1 (TestChainAndPoints chain points) choices =
210210
runSimOrThrow
211211
(connect_pipelined (testClientPipelinedMax chain points) chain choices)
212-
==
212+
===
213213
map Left (pointsToRanges chain points)
214214
++ map Right (receivedBlockBodies chain points)
215215

216216

217217
-- | With a client that collects eagerly and the driver chooses maximum
218218
-- pipelining then we get all requests followed by all responses.
219219
--
220-
prop_connect_pipelined2 :: TestChainAndPoints -> Bool
220+
prop_connect_pipelined2 :: TestChainAndPoints -> Property
221221
prop_connect_pipelined2 (TestChainAndPoints chain points) =
222222
runSimOrThrow
223223
(connect_pipelined (testClientPipelinedMin chain points) chain choices)
224-
==
224+
===
225225
map Left (pointsToRanges chain points)
226226
++ map Right (receivedBlockBodies chain points)
227227
where
@@ -231,11 +231,11 @@ prop_connect_pipelined2 (TestChainAndPoints chain points) =
231231
-- | With a client that collects eagerly and the driver chooses minimum
232232
-- pipelining then we get the interleaving of requests with responses.
233233
--
234-
prop_connect_pipelined3 :: TestChainAndPoints -> Bool
234+
prop_connect_pipelined3 :: TestChainAndPoints -> Property
235235
prop_connect_pipelined3 (TestChainAndPoints chain points) =
236236
runSimOrThrow
237237
(connect_pipelined (testClientPipelinedMin chain points) chain choices)
238-
==
238+
===
239239
concat [ [Left l, Right r]
240240
| l <- pointsToRanges chain points
241241
| r <- receivedBlockBodies chain points ]
@@ -247,11 +247,11 @@ prop_connect_pipelined3 (TestChainAndPoints chain points) =
247247
-- pipelining then we get complex interleavings given by the reference
248248
-- specification 'pipelineInterleaving'.
249249
--
250-
prop_connect_pipelined4 :: TestChainAndPoints -> [Bool] -> Bool
250+
prop_connect_pipelined4 :: TestChainAndPoints -> [Bool] -> Property
251251
prop_connect_pipelined4 (TestChainAndPoints chain points) choices =
252252
runSimOrThrow
253253
(connect_pipelined (testClientPipelinedMin chain points) chain choices)
254-
==
254+
===
255255
pipelineInterleaving maxBound choices
256256
(pointsToRanges chain points)
257257
(receivedBlockBodies chain points)
@@ -264,13 +264,13 @@ prop_connect_pipelined4 (TestChainAndPoints chain points) choices =
264264
-- outstanding messages.
265265
--
266266
prop_connect_pipelined5 :: TestChainAndPoints -> PipeliningDepth
267-
-> [Bool] -> Bool
267+
-> [Bool] -> Property
268268
prop_connect_pipelined5 (TestChainAndPoints chain points)
269269
(PipeliningDepth omax) choices =
270270
runSimOrThrow
271271
(connect_pipelined (testClientPipelinedLimited omax chain points)
272272
chain choices)
273-
==
273+
===
274274
pipelineInterleaving (omax) choices
275275
(pointsToRanges chain points)
276276
(receivedBlockBodies chain points)

0 commit comments

Comments
 (0)