Skip to content

Commit f53e4f6

Browse files
committed
In the state machine tests, shrink mupserts and table unions
This gives us reasonable test sizes involving unions.
1 parent 9607654 commit f53e4f6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/Test/Database/LSMTree/StateMachine.hs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,6 +1687,19 @@ shrinkActionWithVars _ctx _st = \case
16871687
| let f k = (k, R.Delete)
16881688
]
16891689

1690+
Mupserts kvs tableVar -> [
1691+
Some $ Mupserts kvs' tableVar
1692+
| kvs' <- QC.shrink kvs
1693+
] <> [
1694+
Some $ Updates (V.map f kvs) tableVar
1695+
| let f (k, v) = (k, R.Mupsert v)
1696+
]
1697+
1698+
Unions tableVars -> [
1699+
Some $ Unions tableVars'
1700+
| tableVars' <- QC.liftShrink (const []) tableVars
1701+
]
1702+
16901703
Lookups ks tableVar -> [ Some $ Lookups ks' tableVar | ks' <- QC.shrink ks ]
16911704

16921705
-- Snapshots

0 commit comments

Comments
 (0)