Skip to content

Commit 9f3b669

Browse files
committed
slightly adjust weights of generators for app tests
The 'loseConnection' case is only needed _sometimes_, to simulate transient failures. Having is trigger on almost every property run is counterproductive and make the test horribly slow.
1 parent 16a0f5c commit 9f3b669

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/Test/Kupo/AppSpec.hs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -644,28 +644,28 @@ generator inputManagement model =
644644
)
645645
]
646646
blocks@(tip:_) -> Just $ frequency
647-
[ (3, pure GetMostRecentCheckpoint)
648-
, (3, GetPreviousCheckpoint <$> oneof
647+
[ (10, pure GetMostRecentCheckpoint)
648+
, (10, GetPreviousCheckpoint <$> oneof
649649
[ getPointSlotNo <$> genNonGenesisPoint
650650
, elements (getPointSlotNo . blockPoint <$> blocks)
651651
]
652652
)
653-
, (5, pure GetUtxo)
654-
, (5, GetDatumByHash <$> genOrSelectDatum inputManagement model)
655-
, (3, GetScriptByHash <$> genOrSelectScript model)
656-
, (3, GetMetadataBySlotNo . SlotNo <$> (elements [0 .. unSlotNo (getPointSlotNo (blockPoint tip))]))
657-
, (15, DoRollForward
653+
, (20, pure GetUtxo)
654+
, (20, GetDatumByHash <$> genOrSelectDatum inputManagement model)
655+
, (10, GetScriptByHash <$> genOrSelectScript model)
656+
, (10, GetMetadataBySlotNo . SlotNo <$> (elements [0 .. unSlotNo (getPointSlotNo (blockPoint tip))]))
657+
, (60, DoRollForward
658658
<$> genContinuingTip (networkTip model) (blockPoint tip)
659659
<*> genContinuingBlock
660660
(unspentOutputReferences model)
661661
(mempool model)
662662
(blockPoint tip)
663663
)
664-
, (3, DoRollBackward
664+
, (10, DoRollBackward
665665
<$> genContinuingTip (networkTip model) (blockPoint tip)
666666
<*> selectPastPoint (blockPoint <$> blocks)
667667
)
668-
, (1, pure Pause)
668+
, (5, pure Pause)
669669
, (1, pure LoseConnection)
670670
]
671671

0 commit comments

Comments
 (0)