Open jonathanknowles opened 1 week ago
This PR demonstrates that the JSON roundtrip property does not always hold for values of the TxMetadataWithSchema type, and provides a single counterexample:
TxMetadataWithSchema
TxMetadataWithSchema TxMetadataNoSchema $ Cardano.TxMetadata $ Map.fromList [ ( 1 , Cardano.TxMetaMap [ (Cardano.TxMetaText "k", Cardano.TxMetaText "v1") , (Cardano.TxMetaText "k", Cardano.TxMetaText "v2") ] ) ]
With the following command:
cabal test cardano-wallet-unit --test-options '--match "Broken round trip for TxMetadataWithSchema"'
We see the following failure (link to failure on Buildkite):
Cardano.Wallet.Api.Types Broken round trip for TxMetadataWithSchema [x] Failures: test/unit/Cardano/Wallet/Api/TypesSpec.hs:905:47: 1) Cardano.Wallet.Api.Types Broken round trip for TxMetadataWithSchema expected: Just (TxMetadataWithSchema {txMetadataWithSchema_schema = TxMetadataNoSchema, txMetadataWithSchema_metadata = TxMetadata (fromList [(1,TxMetaMap [(TxMetaText "k",TxMetaText "v1"),(TxMetaText "k",TxMetaText "v2")])])}) but got: Just (TxMetadataWithSchema {txMetadataWithSchema_schema = TxMetadataNoSchema, txMetadataWithSchema_metadata = TxMetadata (fromList [(1,TxMetaMap [(TxMetaText "k",TxMetaText "v2")])])}) To rerun use: --match "/Cardano.Wallet.Api.Types/Broken round trip for TxMetadataWithSchema/" --seed 321733787 Randomized with seed 321733787
Related Issue
4647
Description
This PR demonstrates that the JSON roundtrip property does not always hold for values of the
TxMetadataWithSchema
type, and provides a single counterexample:With the following command:
We see the following failure (link to failure on Buildkite):