X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Ffunction.c;h=dc4e6e9a2e9c6099f5794991af5f4a95aa3fa29c;hb=83d63a1f916b073f8cf44cf91b6c0b3d118dabe5;hp=a08e1eaabbf569f333e1c7ca3f44b8056f3c012c;hpb=26c1a71921b1468d56f6edaa7e6e3855ec1c879f;p=m6w6%2Flibmemcached diff --git a/tests/function.c b/tests/function.c index a08e1eaa..dc4e6e9a 100644 --- a/tests/function.c +++ b/tests/function.c @@ -2458,6 +2458,23 @@ memcached_return set_memory_alloc(memcached_st *memc) return MEMCACHED_SUCCESS; } +memcached_return enable_wheel(memcached_st *memc) +{ + memcached_server_distribution value= MEMCACHED_DISTRIBUTION_CONSISTENT_WHEEL; + memcached_hash hash; + memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, value); + pre_hsieh(memc); + + value= (memcached_server_distribution)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION); + assert(value == MEMCACHED_DISTRIBUTION_CONSISTENT_WHEEL); + + hash= (memcached_hash)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_HASH); + assert(hash == MEMCACHED_HASH_HSIEH); + + + return MEMCACHED_SUCCESS; +} + memcached_return enable_consistent(memcached_st *memc) { memcached_server_distribution value= MEMCACHED_DISTRIBUTION_CONSISTENT; @@ -2689,6 +2706,7 @@ collection_st collection[] ={ {"poll_timeout", poll_timeout, 0, tests}, {"gets", enable_cas, 0, tests}, {"consistent", enable_consistent, 0, tests}, + {"wheel", enable_wheel, 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},