Test mistake

If random integer was low, total could be below threshold - so calculate total correctly.

Should make value re-generate random uniform, but test is still valid without this
This commit is contained in:
Martin Sumner 2018-09-25 18:32:48 +01:00
parent 051fcd672c
commit 0772317247
2 changed files with 19 additions and 1 deletions

View file

@ -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),