Multi-key test
Now failing with timeout coverage enabled. 100 keys is unnecessray so reduce to 20 per loop, but suspect this is another issue
This commit is contained in:
parent
c0e1455430
commit
eb76a6dbcd
1 changed files with 6 additions and 6 deletions
|
@ -934,28 +934,28 @@ multi_key_test() ->
|
||||||
C2 = #r_content{metadata=MD2, value=V2},
|
C2 = #r_content{metadata=MD2, value=V2},
|
||||||
Obj2 = #r_object{bucket=B2, key=K2, contents=[C2], vclock=[{'a',1}]},
|
Obj2 = #r_object{bucket=B2, key=K2, contents=[C2], vclock=[{'a',1}]},
|
||||||
ok = book_put(Bookie1, B1, K1, Obj1, Spec1, ?RIAK_TAG),
|
ok = book_put(Bookie1, B1, K1, Obj1, Spec1, ?RIAK_TAG),
|
||||||
ObjL1 = generate_multiple_robjects(100, 3),
|
ObjL1 = generate_multiple_robjects(20, 3),
|
||||||
SW1 = os:timestamp(),
|
SW1 = os:timestamp(),
|
||||||
lists:foreach(fun({O, S}) ->
|
lists:foreach(fun({O, S}) ->
|
||||||
{B, K} = leveled_codec:riakto_keydetails(O),
|
{B, K} = leveled_codec:riakto_keydetails(O),
|
||||||
ok = book_put(Bookie1, B, K, O, S, ?RIAK_TAG)
|
ok = book_put(Bookie1, B, K, O, S, ?RIAK_TAG)
|
||||||
end,
|
end,
|
||||||
ObjL1),
|
ObjL1),
|
||||||
io:format("PUT of 100 objects completed in ~w microseconds~n",
|
io:format("PUT of 20 objects completed in ~w microseconds~n",
|
||||||
[timer:now_diff(os:timestamp(),SW1)]),
|
[timer:now_diff(os:timestamp(),SW1)]),
|
||||||
ok = book_put(Bookie1, B2, K2, Obj2, Spec2, ?RIAK_TAG),
|
ok = book_put(Bookie1, B2, K2, Obj2, Spec2, ?RIAK_TAG),
|
||||||
{ok, F1A} = book_get(Bookie1, B1, K1, ?RIAK_TAG),
|
{ok, F1A} = book_get(Bookie1, B1, K1, ?RIAK_TAG),
|
||||||
?assertMatch(F1A, Obj1),
|
?assertMatch(F1A, Obj1),
|
||||||
{ok, F2A} = book_get(Bookie1, B2, K2, ?RIAK_TAG),
|
{ok, F2A} = book_get(Bookie1, B2, K2, ?RIAK_TAG),
|
||||||
?assertMatch(F2A, Obj2),
|
?assertMatch(F2A, Obj2),
|
||||||
ObjL2 = generate_multiple_robjects(100, 103),
|
ObjL2 = generate_multiple_robjects(20, 23),
|
||||||
SW2 = os:timestamp(),
|
SW2 = os:timestamp(),
|
||||||
lists:foreach(fun({O, S}) ->
|
lists:foreach(fun({O, S}) ->
|
||||||
{B, K} = leveled_codec:riakto_keydetails(O),
|
{B, K} = leveled_codec:riakto_keydetails(O),
|
||||||
ok = book_put(Bookie1, B, K, O, S, ?RIAK_TAG)
|
ok = book_put(Bookie1, B, K, O, S, ?RIAK_TAG)
|
||||||
end,
|
end,
|
||||||
ObjL2),
|
ObjL2),
|
||||||
io:format("PUT of 100 objects completed in ~w microseconds~n",
|
io:format("PUT of 20 objects completed in ~w microseconds~n",
|
||||||
[timer:now_diff(os:timestamp(),SW2)]),
|
[timer:now_diff(os:timestamp(),SW2)]),
|
||||||
{ok, F1B} = book_get(Bookie1, B1, K1, ?RIAK_TAG),
|
{ok, F1B} = book_get(Bookie1, B1, K1, ?RIAK_TAG),
|
||||||
?assertMatch(F1B, Obj1),
|
?assertMatch(F1B, Obj1),
|
||||||
|
@ -968,14 +968,14 @@ multi_key_test() ->
|
||||||
?assertMatch(F1C, Obj1),
|
?assertMatch(F1C, Obj1),
|
||||||
{ok, F2C} = book_get(Bookie2, B2, K2, ?RIAK_TAG),
|
{ok, F2C} = book_get(Bookie2, B2, K2, ?RIAK_TAG),
|
||||||
?assertMatch(F2C, Obj2),
|
?assertMatch(F2C, Obj2),
|
||||||
ObjL3 = generate_multiple_robjects(100, 203),
|
ObjL3 = generate_multiple_robjects(20, 43),
|
||||||
SW3 = os:timestamp(),
|
SW3 = os:timestamp(),
|
||||||
lists:foreach(fun({O, S}) ->
|
lists:foreach(fun({O, S}) ->
|
||||||
{B, K} = leveled_codec:riakto_keydetails(O),
|
{B, K} = leveled_codec:riakto_keydetails(O),
|
||||||
ok = book_put(Bookie2, B, K, O, S, ?RIAK_TAG)
|
ok = book_put(Bookie2, B, K, O, S, ?RIAK_TAG)
|
||||||
end,
|
end,
|
||||||
ObjL3),
|
ObjL3),
|
||||||
io:format("PUT of 100 objects completed in ~w microseconds~n",
|
io:format("PUT of 20 objects completed in ~w microseconds~n",
|
||||||
[timer:now_diff(os:timestamp(),SW3)]),
|
[timer:now_diff(os:timestamp(),SW3)]),
|
||||||
{ok, F1D} = book_get(Bookie2, B1, K1, ?RIAK_TAG),
|
{ok, F1D} = book_get(Bookie2, B1, K1, ?RIAK_TAG),
|
||||||
?assertMatch(F1D, Obj1),
|
?assertMatch(F1D, Obj1),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue