@@ -20,16 +20,14 @@ import qualified Test.QuickCheck.Gen as QC
20
20
import qualified Test.QuickCheck.Random as QC
21
21
import Test.QuickCheck.StateModel.Lockstep
22
22
import Test.Tasty (TestTree , testGroup )
23
+ import qualified Test.Tasty.QuickCheck as QC
23
24
import Test.Util.PrettyProxy
24
25
25
26
tests :: TestTree
26
27
tests = 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
30
30
]
31
- where
32
- _unused = prop_example
33
31
34
32
instance DynLogicModel (Lockstep (ModelState R. Table ))
35
33
@@ -52,22 +50,21 @@ prop_example =
52
50
-- instead
53
51
tr = nullTracer
54
52
55
- -- | Create an initial "large" table, and then proceed with random actions as
56
- -- usual.
53
+ -- | Create an initial "large" table
57
54
dl_example :: DL (Lockstep (ModelState R. Table )) ()
58
55
dl_example = do
59
56
-- Create an initial table and fill it with some inserts
60
57
var3 <- action $ New (PrettyProxy @ ((Key , Value , Blob ))) (TableConfig {
61
58
confMergePolicy = MergePolicyLazyLevelling
62
59
, confSizeRatio = Four
63
- , confWriteBufferAlloc = AllocNumEntries (NumEntries 30 )
60
+ , confWriteBufferAlloc = AllocNumEntries (NumEntries 4 )
64
61
, confBloomFilterAlloc = AllocFixed 10
65
62
, confFencePointerIndex = CompactIndex
66
63
, confDiskCachePolicy = DiskCacheNone
67
64
, confMergeSchedule = OneShot })
68
65
let kvs :: Map. Map Key Value
69
66
kvs = Map. fromList $
70
- QC. unGen (QC. vectorOf 678 $ (,) <$> QC. arbitrary <*> QC. arbitrary)
67
+ QC. unGen (QC. vectorOf 37 $ (,) <$> QC. arbitrary <*> QC. arbitrary)
71
68
(QC. mkQCGen 42 ) 30
72
69
ups :: V. Vector (Key , Update Value Blob )
73
70
ups = V. fromList
@@ -84,5 +81,3 @@ dl_example = do
84
81
| Just tbl <- (Model. fromSomeTable @ Key @ Value @ Blob smTbl)
85
82
-> Map. size (Model. values tbl) == Map. size kvs
86
83
_ -> False
87
- -- Perform any sequence of actions after
88
- anyActions_
0 commit comments