diff --git a/test/end_to_end/iterator_SUITE.erl b/test/end_to_end/iterator_SUITE.erl index e7940d8..83c3de3 100644 --- a/test/end_to_end/iterator_SUITE.erl +++ b/test/end_to_end/iterator_SUITE.erl @@ -163,7 +163,20 @@ small_load_with2i(_Config) -> {foldobjects_bybucket, ?RIAK_TAG, "Bucket", all, {SumIntFun, 0}, true}, {async, Sum1} = leveled_bookie:book_returnfolder(Bookie1, BucketObjQ), Total1 = Sum1(), - true = Total1 > 100000, + io:format("Total from summing all I is ~w~n", [Total1]), + SumFromObjLFun = + fun(Obj, Acc) -> + {I, _Bin} = testutil:get_value_from_objectlistitem(Obj), + Acc + I + end, + ObjL1Total = + lists:foldl(SumFromObjLFun, 0, ObjL1), + ChkList1Total = + lists:foldl(SumFromObjLFun, 0, ChkList1), + io:format("Total in original object list ~w and from removed list ~w~n", + [ObjL1Total, ChkList1Total]), + + Total1 = ObjL1Total - ChkList1Total, ok = leveled_bookie:book_close(Bookie1), diff --git a/test/end_to_end/testutil.erl b/test/end_to_end/testutil.erl index 8501f25..176c065 100644 --- a/test/end_to_end/testutil.erl +++ b/test/end_to_end/testutil.erl @@ -50,6 +50,7 @@ foldkeysfun_returnbucket/3, sync_strategy/0, riak_object/4, + get_value_from_objectlistitem/1, numbered_key/1, fixed_bin_key/1]). @@ -478,6 +479,10 @@ set_object(Bucket, Key, Value, IndexGen, Indexes2Remove) -> vclock=generate_vclock()}, Spec1}. +get_value_from_objectlistitem({_Int, Obj, _Spc}) -> + [Content] = Obj#r_object.contents, + Content#r_content.value. + update_some_objects(Bookie, ObjList, SampleSize) -> StartWatchA = os:timestamp(), ToUpdateList = lists:sublist(lists:sort(ObjList), SampleSize),