Skip to content

Commit

Permalink
Remove hack workaround for earlier eleveldb bug
Browse files Browse the repository at this point in the history
  • Loading branch information
slfritchie committed Apr 11, 2014
1 parent 5cd2f09 commit 2a72ad3
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions test/generic_qc_fsm.erl
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ prop(FI_enabledP) ->

prop(FI_enabledP, VerboseP) ->
_ = faulterl_nif:poke("bc_fi_enabled", 0, <<0:8/native>>, false),
{ok, RE1} = re:compile("open,.*put,.*close,.*open,.*get,"),
?FORALL({Cmds, Seed}, {commands(?MODULE), choose(1,99999)},
begin
faulterl_nif:poke("bc_fi_enabled", 0, <<0:8/native>>, false),
Expand Down Expand Up @@ -174,25 +173,26 @@ prop(FI_enabledP, VerboseP) ->
%% application:unload(bitcask),
Trace0 = event_logger:get_events(),
Trace = remove_timestamps(Trace0),
{Sane0, VerifyDict} = verify_trace(Trace),
Sane = case Sane0 of
{get,_How,_K,expected,[_EXP],got,_GOT}
when %(is_binary(EXP) andalso GOT == not_found)
%orelse
%(EXP == not_found andalso is_binary(GOT)) ->
true ->
SimpleTrace1 = simplify_trace(Trace),
Str = lists:flatten(io_lib:format("~w", [SimpleTrace1])),
case re:run(Str, RE1) of
{match, _} ->
?QC_FMT("SKIP1", []),
true;
_ ->
Sane0
end;
Else ->
Else
end,
{Sane, VerifyDict} = verify_trace(Trace),
%% This is a hack to avoid an earlier problem with eleveldb.
%% Sane = case Sane0 of
%% {get,_How,_K,expected,[_EXP],got,_GOT}
%% when %(is_binary(EXP) andalso GOT == not_found)
%% %orelse
%% %(EXP == not_found andalso is_binary(GOT)) ->
%% true ->
%% SimpleTrace1 = simplify_trace(Trace),
%% Str = lists:flatten(io_lib:format("~w", [SimpleTrace1])),
%% case re:run(Str, RE1) of
%% {match, _} ->
%% ?QC_FMT("SKIP1", []),
%% true;
%% _ ->
%% Sane0
%% end;
%% Else ->
%% Else
%% end,

NumKeys = dict:size(VerifyDict),
Logs = length(filelib:wildcard(TestDir ++ "/*.log")),
Expand Down

0 comments on commit 2a72ad3

Please sign in to comment.