Improvements on valgrind detection.
[m6w6/libmemcached] / tests / libmemcached-1.0 / generate.cc
index 83552304554c976ed6426e3d77c2ae0038c97832..da31fe0cefe680a31dbac985cab7f1fb80454586 100644 (file)
@@ -43,7 +43,6 @@
 
 #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"
@@ -52,6 +51,8 @@
 #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];
@@ -113,7 +114,7 @@ test_return_t generate_data_with_stats(memcached_st *memc)
   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)