Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add mock_kv_store:put/2

  • Loading branch information...
commit d69daea696d2bed22eb4bf56aea87bb6861f3321 1 parent f2250b5
Kresten Krab Thorup authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 test/mock_kv_store.erl
9 test/mock_kv_store.erl
View
@@ -1,6 +1,6 @@
-module(mock_kv_store, [ClientID, ContentTable, MetaTable, MainBucket, MapRedDelay]).
--export([get/2, put/1, put/5, get_bucket/1, set_bucket/2, mapred_bucket_stream/3, get_client_id/0, content_table/0]).
+-export([get/2, put/1, put/2, put/5, get_bucket/1, set_bucket/2, mapred_bucket_stream/3, get_client_id/0, content_table/0]).
-export([init/1, stop/0]).
@@ -49,9 +49,12 @@ get(Bucket, Key) ->
end.
put(Obj) ->
- put (Obj, 1, 1, 1, []).
+ THIS:put (Obj, [{w,1},{dw,1},{timeout,1}]).
-put(Obj,_W,_DW,_TimeOut,Options) ->
+put(Obj,W,DW,TimeOut,Options) ->
+ THIS:put(Obj,[{w,W},{dw,DW},{timeout,TimeOut}|Options]).
+
+put(Obj,Options) ->
Bucket = riak_object:bucket(Obj),
Key = riak_object:key(Obj),
Please sign in to comment.
Something went wrong with that request. Please try again.