anchor.diff:           bucket_config_get/2,
            bucket_config_get/3,
            bucket_config_delete/2,
  +         bucket_flush/2,
            addrs/2,
            list/1]).
   
  
positive.code:     Buckets = proplists:get_value(buckets, PoolConf),
      lists:map(fun({K, _V}) -> K end, Buckets).
  
  % ------------------------------------------------
  
  % Fake hash_key/hash_addr functions for unit testing.
  
negative.code:     ?assertEqual([{buckets, [{x, xxx}]}],
                   bucket_config_set([{buckets, [{x, xx}]}], x, xxx)),
      ok.
  
  bucket_flush_test() ->
      {ok, _Pid} = mc_downstream:start_link(),
      {ok, Sock} = gen_tcp:connect("localhost", 11211,
                                   [binary, {packet, 0}, {active, false}]),
      (fun () ->
          {ok, _H, _E, undefined} =
                   mc_client_binary:cmd(?SET, Sock, undefined, undefined,
                                        {#mc_header{},
                                         #mc_entry{key = <<"a">>,
                                                   data = <<"AAA">>}})
       end)(),
      A1 = mc_addr:create("127.0.0.1:11211", binary),
      B1 = mc_addr:create("localhost:11211", binary),
      ok = bucket_flush([A1, B1]),
      {ok, _H, _E, X} =
          mc_client_binary:cmd(?GET, Sock,
                               fun(#mc_header{status = ?SUCCESS}, ME, CD) ->
                                       dict:store(ME#mc_entry.key,
                                                  ME#mc_entry.data,
                                                  CD);
                                  (_, _, CD) -> CD
                               end,
                               dict:new(),
                               {#mc_header{}, #mc_entry{key = <<"a">>}}),
      ?assertEqual(0, dict:size(X)),
      ok = gen_tcp:close(Sock).
  
  