servers= memcached_servers_parse(server_string);
rc= memcached_server_push(memc, servers);
+ memcached_server_list_free(servers);
callbacks[0]= server_print_callback;
memcached_server_cursor(memc, callbacks, NULL, 1);
server= memcached_server_by_key(memc, "a", 1, &res);
+ memcached_free(memc);
+
return TEST_SUCCESS;
}
const char *keys[]= { "key1", "key2", "key3", "key4", "key5", "key6", "key7" };
size_t len[]= { 4, 4, 4, 4, 4, 4, 4 };
- for (int x=0; x< 7; ++x)
+ for (size_t x= 0; x< 7; ++x)
{
rc= memcached_set(memc, keys[x], len[x], "1", 1, 0, 0);
test_true(rc == MEMCACHED_SUCCESS);
return TEST_SUCCESS;
}
+static test_return_t test_verbosity(memcached_st *memc)
+{
+ memcached_verbosity(memc, 3);
+
+ return TEST_SUCCESS;
+}
+
/*
* This test ensures that the failure counter isn't incremented during
* normal termination of the memcached instance.
*/
static test_return_t sasl_auth_test(memcached_st *memc)
{
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
memcached_return_t rc;
rc= memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0);
memcached_quit(memc);
return TEST_SUCCESS;
+#else
+ (void)memc;
+ return TEST_FAILURE;
+#endif
}
/* Clean the server before beginning testing */
{"connectionpool", 1, (test_callback_fn)connection_pool_test },
#endif
{"test_get_last_disconnect", 1, (test_callback_fn)test_get_last_disconnect},
+ {"verbosity", 1, (test_callback_fn)test_verbosity},
{0, 0, 0}
};
{0, 0, (test_callback_fn)0}
};
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
test_st sasl_auth_tests[]= {
{"sasl_auth", 1, (test_callback_fn)sasl_auth_test },
{0, 0, (test_callback_fn)0}
};
-#endif
test_st ketama_compatibility[]= {
{"libmemcached", 1, (test_callback_fn)ketama_compatibility_libmemcached },