projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Concurrent memcached_verbosity().
[awesomized/libmemcached]
/
tests
/
mem_functions.c
diff --git
a/tests/mem_functions.c
b/tests/mem_functions.c
index 68d40d921482bdde66576f924b891a9e5f262eea..dca68b121ca891989ca285835aff5873f081e736 100644
(file)
--- a/
tests/mem_functions.c
+++ b/
tests/mem_functions.c
@@
-190,6
+190,7
@@
static test_return_t memcached_server_remove_test(memcached_st *ptr __attribute_
servers= memcached_servers_parse(server_string);
rc= memcached_server_push(memc, servers);
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);
callbacks[0]= server_print_callback;
memcached_server_cursor(memc, callbacks, NULL, 1);
@@
-2729,6
+2730,8
@@
static test_return_t user_supplied_bug19(memcached_st *not_used)
server= memcached_server_by_key(memc, "a", 1, &res);
server= memcached_server_by_key(memc, "a", 1, &res);
+ memcached_free(memc);
+
return TEST_SUCCESS;
}
return TEST_SUCCESS;
}
@@
-4487,7
+4490,7
@@
static test_return_t replication_randomize_mget_test(memcached_st *memc)
const char *keys[]= { "key1", "key2", "key3", "key4", "key5", "key6", "key7" };
size_t len[]= { 4, 4, 4, 4, 4, 4, 4 };
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);
{
rc= memcached_set(memc, keys[x], len[x], "1", 1, 0, 0);
test_true(rc == MEMCACHED_SUCCESS);
@@
-5404,6
+5407,13
@@
static test_return_t test_get_last_disconnect(memcached_st *memc)
return TEST_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.
/*
* This test ensures that the failure counter isn't incremented during
* normal termination of the memcached instance.
@@
-5543,6
+5553,7
@@
static test_return_t regression_bug_490486(memcached_st *memc)
*/
static test_return_t sasl_auth_test(memcached_st *memc)
{
*/
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_return_t rc;
rc= memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0);
@@
-5564,6
+5575,10
@@
static test_return_t sasl_auth_test(memcached_st *memc)
memcached_quit(memc);
return TEST_SUCCESS;
memcached_quit(memc);
return TEST_SUCCESS;
+#else
+ (void)memc;
+ return TEST_FAILURE;
+#endif
}
/* Clean the server before beginning testing */
}
/* Clean the server before beginning testing */
@@
-5624,6
+5639,7
@@
test_st tests[] ={
{"connectionpool", 1, (test_callback_fn)connection_pool_test },
#endif
{"test_get_last_disconnect", 1, (test_callback_fn)test_get_last_disconnect},
{"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, 0}
};
@@
-5725,12
+5741,10
@@
test_st regression_tests[]= {
{0, 0, (test_callback_fn)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}
};
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 },
test_st ketama_compatibility[]= {
{"libmemcached", 1, (test_callback_fn)ketama_compatibility_libmemcached },