Permalink
Browse files

Fix model problem in bitcask_qc_expiry.erl

Here's a failing test case:

    [{[{delete,<<1>>,<<>>},{put,<<0>>,<<>>}],10,1,5,5}]

... and the result:

                      {expected,false},
                      {value,
                          {true, [blah blah...]

It's just too damn difficult to model needs_merge() when there's
so little data written.  So, we use the ?IMPLIES to check that
there are more than 2 'put' operations.
  • Loading branch information...
1 parent e85a710 commit 9424148f97b352856f7201777044c6e8490ce169 @slfritchie slfritchie committed Nov 25, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 test/bitcask_qc_expiry.erl
@@ -90,7 +90,8 @@ prop_expiry() ->
?FORALL({Ops, Expiry, ExpiryGrace, Timestep, M1},
{eqc_gen:non_empty(list(ops(Keys, Values))),
choose(1,10), choose(1, 10), choose(5, 50), choose(5,128)},
- ?IMPLIES(length(Ops) > 1,
+ ?IMPLIES(length(Ops) > 1 andalso
+ length([foo || {put, _, _} <- Ops]) > 2,
begin
Dirname = "/tmp/bc.prop.expiry",
?cmd("rm -rf " ++ Dirname),

0 comments on commit 9424148

Please sign in to comment.