Add test with presence check

Add a test in each loop with a check for the presence of the object in the Journal
This commit is contained in:
Martin Sumner 2017-11-01 15:23:28 +00:00
parent ee7f9ee4e0
commit 2428d2cbff

View file

@ -3,16 +3,16 @@
-include("include/leveled.hrl"). -include("include/leveled.hrl").
-export([all/0]). -export([all/0]).
-export([ -export([
perbucket_aae/1 crossbucket_aae/1
]). ]).
all() -> [ all() -> [
perbucket_aae crossbucket_aae
]. ].
-define(MAGIC, 53). % riak_kv -> riak_object -define(MAGIC, 53). % riak_kv -> riak_object
perbucket_aae(_Config) -> crossbucket_aae(_Config) ->
% Test requires multiple different databases, so want to mount them all % Test requires multiple different databases, so want to mount them all
% on individual file paths % on individual file paths
RootPathA = testutil:reset_filestructure("testA"), RootPathA = testutil:reset_filestructure("testA"),
@ -157,6 +157,26 @@ test_singledelta_stores(BookA, BookB, TreeSize, DeltaKey) ->
io:format("Segment lists found of lengths ~w ~w~n", io:format("Segment lists found of lengths ~w ~w~n",
[length(BookASegList1), length(BookBSegList1)]), [length(BookASegList1), length(BookBSegList1)]),
SuperHeadSegmentFolderCP =
{foldheads_allkeys,
?RIAK_TAG,
{get_segment_folder(DLs, TreeSize), []},
true, true, SegFilterList},
SW_SL1CP = os:timestamp(),
{async, BookASegFolder1CP} =
leveled_bookie:book_returnfolder(BookA, SuperHeadSegmentFolderCP),
{async, BookBSegFolder1CP} =
leveled_bookie:book_returnfolder(BookB, SuperHeadSegmentFolderCP),
BookASegList1CP = BookASegFolder1CP(),
BookBSegList1CP = BookBSegFolder1CP(),
Time_SL1CP = timer:now_diff(os:timestamp(), SW_SL1CP)/1000,
io:format("Two filtered segment list folds " ++
"with presence check took ~w milliseconds ~n",
[Time_SL1CP]),
io:format("Segment lists found of lengths ~w ~w~n",
[length(BookASegList1CP), length(BookBSegList1CP)]),
FalseMatchFilter = DLs ++ [1, 100, 101, 1000, 1001], FalseMatchFilter = DLs ++ [1, 100, 101, 1000, 1001],
SegFilterListF = SegFilterListF =