Remove assert
[m6w6/libmemcached] / tests / libmemcached-1.0 / all_tests.cc
index 5aa59f8852e048b098ea8ade94a651b4d4b3947b..b8f93fb562b039b339a331695d9510502f58f603 100644 (file)
@@ -35,8 +35,6 @@
  *
  */
 
-#define TEST_PORT_BASE MEMCACHED_DEFAULT_PORT +10
-
 #include <config.h>
 #include <libtest/test.hpp>
 
 
 void get_world(Framework *world)
 {
+  if (getenv("LIBMEMCACHED_SERVER_NUMBER"))
+  {
+    int set_count= atoi(getenv("LIBMEMCACHED_SERVER_NUMBER"));
+    fatal_assert(set_count >= 0);
+    world->servers().set_count(set_count);
+  }
+  else
+  {
+    world->servers().set_count(8);
+  }
+
   world->collections= collection;
 
   world->_create= (test_callback_create_fn*)world_create;