@@ -20,16 +20,14 @@ import qualified Test.QuickCheck.Gen as QC
2020import qualified Test.QuickCheck.Random as QC
2121import Test.QuickCheck.StateModel.Lockstep
2222import Test.Tasty (TestTree , testGroup )
23+ import qualified Test.Tasty.QuickCheck as QC
2324import Test.Util.PrettyProxy
2425
2526tests :: TestTree
2627tests = testGroup " Test.Database.LSMTree.Normal.StateMachine.DL" [
27- -- This one is not actually enabled, because it runs for rather a long time
28- -- and it's not in itself a very import property.
29- -- QC.testProperty "prop_example" prop_example
28+
29+ QC. testProperty " prop_example" prop_example
3030 ]
31- where
32- _unused = prop_example
3331
3432instance DynLogicModel (Lockstep (ModelState R. Table ))
3533
@@ -52,22 +50,21 @@ prop_example =
5250 -- instead
5351 tr = nullTracer
5452
55- -- | Create an initial "large" table, and then proceed with random actions as
56- -- usual.
53+ -- | Create an initial "large" table
5754dl_example :: DL (Lockstep (ModelState R. Table )) ()
5855dl_example = do
5956 -- Create an initial table and fill it with some inserts
6057 var3 <- action $ New (PrettyProxy @ ((Key , Value , Blob ))) (TableConfig {
6158 confMergePolicy = MergePolicyLazyLevelling
6259 , confSizeRatio = Four
63- , confWriteBufferAlloc = AllocNumEntries (NumEntries 30 )
60+ , confWriteBufferAlloc = AllocNumEntries (NumEntries 4 )
6461 , confBloomFilterAlloc = AllocFixed 10
6562 , confFencePointerIndex = CompactIndex
6663 , confDiskCachePolicy = DiskCacheNone
6764 , confMergeSchedule = OneShot })
6865 let kvs :: Map. Map Key Value
6966 kvs = Map. fromList $
70- QC. unGen (QC. vectorOf 678 $ (,) <$> QC. arbitrary <*> QC. arbitrary)
67+ QC. unGen (QC. vectorOf 37 $ (,) <$> QC. arbitrary <*> QC. arbitrary)
7168 (QC. mkQCGen 42 ) 30
7269 ups :: V. Vector (Key , Update Value Blob )
7370 ups = V. fromList
@@ -84,5 +81,3 @@ dl_example = do
8481 | Just tbl <- (Model. fromSomeTable @ Key @ Value @ Blob smTbl)
8582 -> Map. size (Model. values tbl) == Map. size kvs
8683 _ -> False
87- -- Perform any sequence of actions after
88- anyActions_
0 commit comments