#include <tests/libmemcached-1.0/generate.h>
#include <tests/libmemcached-1.0/fetch_all_results.h>
-#include "tests/libmemcached-1.0/servers_to_create.h"
#include "tests/libmemcached-1.0/callback_counter.h"
#include "clients/generator.h"
#define GLOBAL_COUNT 10000
#define GLOBAL2_COUNT 100
+using namespace libtest;
+
static pairs_st *global_pairs;
static const char *global_keys[GLOBAL_COUNT];
static size_t global_keys_length[GLOBAL_COUNT];
return TEST_SUCCESS;
}
-test_return_t generate_pairs(memcached_st *)
+static test_return_t generate_pairs(memcached_st *)
{
global_pairs= pairs_generate(GLOBAL_COUNT, 400);
global_count= GLOBAL_COUNT;
test_return_t generate_data(memcached_st *memc)
{
+ test_compare(TEST_SUCCESS, generate_pairs(memc));
+
unsigned int check_execute= execute_set(memc, global_pairs, global_count);
test_compare_warn_hint(global_count, check_execute, "Possible false, positive, memcached may have ejected key/value based on memory needs");
test_return_t generate_data_with_stats(memcached_st *memc)
{
+ test_compare(TEST_SUCCESS, generate_pairs(memc));
+
unsigned int check_execute= execute_set(memc, global_pairs, global_count);
test_compare(check_execute, global_count);
memcached_stat_st *stat_p= memcached_stat(memc, NULL, &rc);
test_true(stat_p);
- for (uint32_t host_index= 0; host_index < SERVERS_TO_CREATE; host_index++)
+ for (uint32_t host_index= 0; host_index < memcached_server_count(memc); host_index++)
{
/* This test was changes so that "make test" would work properlly */
if (DEBUG)