Error << "Could not kill() existing server during start() pid:" << _pid;
return false;
}
- assert(not has_pid());
+
+ if (has_pid() == false)
+ {
+ fatal_message("has_pid() failed, programer error");
+ }
Application app(name(), is_libtool());
if (args(app) == false)
return false;
}
- if (Application::SUCCESS != app.run())
+ Application::error_t ret;
+ if (Application::SUCCESS != (ret= app.run()))
{
- Error << "Application::run()";
+ Error << "Application::run() " << ret;
return false;
}
- if (Application::SUCCESS != app.wait())
+ if (Application::SUCCESS != (ret= app.wait()))
{
- Error << "Application::wait()";
+ Error << "Application::wait() " << ret;
return false;
}
{
char buffer[1024];
snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
- const char *args[]= { "--expire=30", buffer, "foo", 0 };
memcached_st *memc= memcached(buffer, strlen(buffer));
test_true(memc);
test_compare(MEMCACHED_SUCCESS, memcached_exist(memc, test_literal_param("foo")));
+ snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+ const char *args[]= { "--expire=30", buffer, "foo", 0 };
test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
test_compare(MEMCACHED_SUCCESS, memcached_exist(memc, test_literal_param("foo")));
static test_return_t NOT_FOUND_test(void *)
{
char buffer[1024];
- snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
- const char *args[]= { "--expire=30", buffer, "foo", 0 };
+ snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
memcached_st *memc= memcached(buffer, strlen(buffer));
test_true(memc);
test_compare(MEMCACHED_NOTFOUND, memcached_exist(memc, test_literal_param("foo")));
+ snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+ const char *args[]= { "--expire=30", buffer, "foo", 0 };
test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
test_compare(MEMCACHED_NOTFOUND, memcached_exist(memc, test_literal_param("foo")));