mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 08:35:22 +00:00
Check round trip and capability for counters / crdts
This commit is contained in:
parent
94bcb1569d
commit
894c17415a
@ -73,7 +73,16 @@ confirm() ->
|
||||
?assertEqual({ok, 7}, riakc_pb_socket:counter_val(PrevPB, ?BUCKET, ?KEY)),
|
||||
?assertEqual(ok, riakc_pb_socket:counter_incr(PB, ?BUCKET, ?KEY, 1)),
|
||||
?assertEqual({ok, 8}, riakc_pb_socket:counter_val(PB, ?BUCKET, ?KEY)),
|
||||
|
||||
%% And check that those 1.4 written values can be accessed / incremented over the 2.0 API
|
||||
|
||||
?assertEqual({ok, {counter, 8, 0}}, riakc_pb_socket:fetch_type(PrevPB, {<<"default">>, ?BUCKET}, ?KEY)),
|
||||
?assertEqual(ok, riakc_pb_socket:update_type(PrevPB, {<<"default">>, ?BUCKET}, ?KEY, gen_counter_op())),
|
||||
?assertEqual({ok, 9}, riakc_pb_socket:counter_val(PB, ?BUCKET, ?KEY)),
|
||||
pass.
|
||||
|
||||
gen_counter_op() ->
|
||||
riakc_counter:to_op(riakc_counter:increment(riakc_counter:new())).
|
||||
|
||||
get_clients(Node) ->
|
||||
{rt:pbc(Node), rt:httpc(Node)}.
|
||||
|
Loading…
Reference in New Issue
Block a user