tests: speedup by not waiting too long for servers
[awesomized/libmemcached] / tests / memflush.cc
index f14b5b727d884f6171d44b89920fd8f4b0cf6abc..c197b4903956c8ada4969e9c0229e68145af0c3d 100644 (file)
   Test that we are cycling the servers we are creating during testing.
 */
 
-#include <config.h>
+#include <mem_config.h>
 
 #include <libtest/test.hpp>
-#include <libmemcached/memcached.h>
+#include <libmemcached-1.0/memcached.h>
 
 using namespace libtest;
 
@@ -95,25 +95,25 @@ collection_st collection[] ={
 
 static void *world_create(server_startup_st& servers, test_return_t& error)
 {
-  if (HAVE_MEMCACHED_BINARY == 0)
+  if (libtest::has_memcached() == false)
   {
     error= TEST_SKIPPED;
     return NULL;
   }
 
-  if (server_startup(servers, "memcached", libtest::default_port(), 0, NULL) == 0)
+  if (server_startup(servers, "memcached", libtest::default_port(), NULL) == 0)
   {
-    error= TEST_FAILURE;
+    error= TEST_SKIPPED;
   }
 
   return &servers;
 }
 
 
-void get_world(Framework *world)
+void get_world(libtest::Framework* world)
 {
   executable= "./clients/memflush";
-  world->collections= collection;
-  world->_create= world_create;
+  world->collections(collection);
+  world->create(world_create);
 }