Correct style, use of newer YATL.
[awesomized/libmemcached] / libtest / server.h
index 7ec3096cf6e9372ed7dc0f97ab108486d1d833a2..bbebe95714c2b000a9d2ee353175a8c9606cb57e 100644 (file)
@@ -177,7 +177,8 @@ public:
 
   virtual bool ping()= 0;
 
-  virtual bool build(size_t argc, const char *argv[])= 0;
+  bool init(const char *argv[]);
+  virtual bool build()= 0;
 
   void add_option(const std::string&);
   void add_option(const std::string&, const std::string&);
@@ -223,6 +224,11 @@ public:
     _error= arg;
   }
 
+  void reset_error()
+  {
+    _error.clear();
+  }
+
   virtual bool wait_for_pidfile() const;
 
   bool check_pid(pid_t pid_arg) const
@@ -260,6 +266,11 @@ public:
     return out_of_ban_killed_;
   }
 
+  void timeout(uint32_t timeout_)
+  {
+    _timeout= timeout_;
+  }
+
 protected:
   bool set_pid_file();
   Options _options;
@@ -276,6 +287,7 @@ private:
   bool args(Application&);
 
   std::string _error;
+  uint32_t _timeout; // This number should be high enough for valgrind startup (which is slow)
 };
 
 std::ostream& operator<<(std::ostream& output, const libtest::Server &arg);