memcached_return enable_consistent(memcached_st *memc)
{
memcached_server_distribution value= MEMCACHED_DISTRIBUTION_CONSISTENT;
+ 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);
+
+ hash= (memcached_hash)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_HASH);
+ assert(hash == MEMCACHED_HASH_HSIEH);
+
return MEMCACHED_SUCCESS;
}
{"user", 0, 0, user_tests},
{"generate", 0, 0, generate_tests},
{"generate_hsieh", pre_hsieh, 0, generate_tests},
+ {"generate_hsieh_consistent", enable_consistent, 0, generate_tests},
+ {"generate_md5", pre_md5, 0, generate_tests},
{"generate_nonblock", pre_nonblock, 0, generate_tests},
{0, 0, 0, 0}
};
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
+#include <fnmatch.h>
#include "test.h"
test_st *run;
run= next->tests;
- if (collection_to_run && strcmp(collection_to_run, next->name))
+ if (collection_to_run && fnmatch(collection_to_run, next->name, FNM_CASEFOLD))
continue;
fprintf(stderr, "\n%s\n\n", next->name);
memcached_return rc;
struct timeval start_time, end_time;
- if (wildcard && strcmp(wildcard, run->name))
+ if (wildcard && fnmatch(wildcard, run->name, FNM_CASEFOLD))
continue;
fprintf(stderr, "Testing %s", run->name);