Merge from private trunk.
[awesomized/libmemcached] / tests / mem_functions.c
index 600ffb8ff26e4d25c8a6f5515fd37105c7a66a2c..15daa39fe001d85df5308810b0a66b882fcb0a3b 100644 (file)
@@ -231,7 +231,12 @@ static memcached_return_t server_display_unsort_function(const memcached_st *ptr
   uint32_t x= *((uint32_t *)(context));
   (void)ptr;
 
-  assert(test_ports[x] == server->port);
+  if (! (test_ports[x] == server->port))
+  {
+    fprintf(stderr, "%lu -> %lu\n", (unsigned long)test_ports[x], (unsigned long)server->port);
+    return MEMCACHED_FAILURE;
+  }
+
   *((uint32_t *)(context))= ++x;
 
   return MEMCACHED_SUCCESS;
@@ -6297,8 +6302,6 @@ collection_st collection[] ={
   {0, 0, 0, 0}
 };
 
-#define SERVERS_TO_CREATE 5
-
 #include "libmemcached_world.h"
 
 void get_world(world_st *world)