try {
if (test_success(return_code= world.item.startup(creators_ptr)))
{
- if (test_success(return_code= world.item.flush(creators_ptr, run)))
+ if (run->requires_flush)
+ {
+ return_code= world.runner()->flush(creators_ptr);
+ }
+
+ if (test_success(return_code))
{
{ // Runner Code
gettimeofday(&start_time, NULL);
{
}
+test_return_t Runner::flush(void*)
+{
+ return TEST_SUCCESS;
+}
+
test_return_t Runner::run(test_callback_fn* func, void *object)
{
if (func)
*/
class Runner {
public:
+ virtual test_return_t flush(void*);
virtual test_return_t run(test_callback_fn* func, void *object);
virtual test_return_t pre(test_callback_fn* func, void *object);
virtual test_return_t post(test_callback_fn* func, void *object);
return _runner_default(libmemcached_test_callback_fn(func), (libmemcached_test_container_st*)object);
}
+ test_return_t flush(void* arg)
+ {
+ return flush((libmemcached_test_container_st*)arg);
+ }
+
+ test_return_t flush(libmemcached_test_container_st *container)
+ {
+ test_true(container->memc);
+ memcached_flush(container->memc, 0);
+ memcached_quit(container->memc);
+
+ return TEST_SUCCESS;
+ }
+
test_return_t pre(test_callback_fn* func, void *object)
{
return _pre_runner_default(libmemcached_test_callback_fn(func), (libmemcached_test_container_st*)object);