Skip to content

Commit ff76698

Browse files
committed
fix arbitrary instance of request id
1 parent 4e79804 commit ff76698

File tree

2 files changed

+4
-2
lines changed
  • libs
    • types-common/src/Data
    • wire-api/test/unit/Test/Wire/API/Roundtrip

2 files changed

+4
-2
lines changed

libs/types-common/src/Data/Id.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,9 @@ newtype RequestId = RequestId
440440
Generic,
441441
ToBytes
442442
)
443-
deriving newtype (Arbitrary)
443+
444+
instance Arbitrary RequestId where
445+
arbitrary = RequestId . UUID.toASCIIBytes <$> arbitrary @UUID
444446

445447
defRequestId :: (IsString s) => s
446448
defRequestId = "N/A"

libs/wire-api/test/unit/Test/Wire/API/Roundtrip/Aeson.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ testRoundTrip ::
367367
T.TestTree
368368
testRoundTrip = testProperty msg trip
369369
where
370-
msg = show (typeRep @a)
370+
msg = show (typeRep @a) <> " JSON roundtrip"
371371
trip (v :: a) =
372372
counterexample (show $ toJSON v) $
373373
Right v === (parseEither parseJSON . toJSON) v

0 commit comments

Comments
 (0)