Extending tests.
author <brian@gir-2.local> <>
Wed, 27 Feb 2008 03:20:19 +0000 (19:20 -0800)
committer <brian@gir-2.local> <>
Wed, 27 Feb 2008 03:20:19 +0000 (19:20 -0800)
tests/function.c

index 6bbaa40cda65de55d7db262ae79c1abbaefc0f12..69ae84b14fcfce8b4af94f7b11e9ed456891ec6f 100644 (file)
@@ -2310,6 +2310,14 @@ memcached_return enable_consistent(memcached_st *memc)
   return MEMCACHED_SUCCESS;
 }
 
+memcached_return enable_replication(memcached_st *memc)
+{
+  uint64_t value;
+  value= 2;
+  enable_consistent(memc);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_REPLICAS, &value);
+}
+
 memcached_return enable_cas(memcached_st *memc)
 {
   unsigned int set= 1;
@@ -2520,6 +2528,7 @@ collection_st collection[] ={
   {"poll_timeout", poll_timeout, 0, tests},
   {"gets", enable_cas, 0, tests},
   {"consistent", enable_consistent, 0, tests},
+  {"replication", enable_consistent, 0, tests},
   {"memory_allocators", set_memory_alloc, 0, tests},
 //  {"udp", pre_udp, 0, tests},
   {"version_1_2_3", check_for_1_2_3, 0, version_1_2_3},