Make the number of servers we test against more flexible.
authorBrian Aker <brian@tangent.org>
Sun, 12 Feb 2012 10:35:10 +0000 (02:35 -0800)
committerBrian Aker <brian@tangent.org>
Sun, 12 Feb 2012 10:35:10 +0000 (02:35 -0800)
tests/libmemcached-1.0/all_tests.cc

index 5aa59f8852e048b098ea8ade94a651b4d4b3947b..8561c9594218084a054884ace674406afb71c633 100644 (file)
 
 void get_world(Framework *world)
 {
+  if (getenv("LIBMEMCACHED_SERVER_NUMBER"))
+  {
+    int set_count= atoi(getenv("LIBMEMCACHED_SERVER_NUMBER"));
+    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;