From: Brian Aker Date: Mon, 16 Apr 2012 05:12:04 +0000 (-0700) Subject: Next pass through generate tests. X-Git-Tag: 1.0.7~7^2^2^2~4 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=60f2851fbf579b4266b316567fbde641049073a2;p=m6w6%2Flibmemcached Next pass through generate tests. --- diff --git a/tests/libmemcached-1.0/all_tests.h b/tests/libmemcached-1.0/all_tests.h index dfc7f259..4e147b21 100644 --- a/tests/libmemcached-1.0/all_tests.h +++ b/tests/libmemcached-1.0/all_tests.h @@ -287,10 +287,6 @@ test_st generate_tests[] ={ {"delete_generate", false, (test_callback_fn*)delete_generate }, {"cleanup", true, (test_callback_fn*)cleanup_pairs }, // New start - {"generate_buffer_data", true, (test_callback_fn*)generate_buffer_data }, - {"delete_buffer", false, (test_callback_fn*)delete_buffer_generate}, - {"cleanup", true, (test_callback_fn*)cleanup_pairs }, - // New start {"generate_data", true, (test_callback_fn*)generate_data }, {"mget_read", false, (test_callback_fn*)mget_read }, {"mget_read_result", false, (test_callback_fn*)mget_read_result }, @@ -471,6 +467,7 @@ collection_st collection[] ={ {"Cal Haldenbrand's tests", 0, 0, haldenbrand_TESTS}, {"user written tests", 0, 0, user_tests}, {"generate", 0, 0, generate_tests}, + {"generate MEMCACHED_BEHAVIOR_BUFFER_REQUESTS", (test_callback_fn*)pre_buffer, 0, generate_tests}, {"generate large", 0, 0, generate_large_TESTS}, {"generate_hsieh", (test_callback_fn*)pre_hsieh, 0, generate_tests}, {"generate_ketama", (test_callback_fn*)pre_behavior_ketama, 0, generate_tests}, diff --git a/tests/libmemcached-1.0/setup_and_teardowns.cc b/tests/libmemcached-1.0/setup_and_teardowns.cc index 5f34f666..95ba4c8d 100644 --- a/tests/libmemcached-1.0/setup_and_teardowns.cc +++ b/tests/libmemcached-1.0/setup_and_teardowns.cc @@ -67,6 +67,13 @@ test_return_t pre_binary(memcached_st *memc) return TEST_SUCCESS; } +test_return_t pre_buffer(memcached_st *memc) +{ + test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, true)); + + return TEST_SUCCESS; +} + test_return_t pre_unix_socket(memcached_st *memc) { struct stat buf; diff --git a/tests/libmemcached-1.0/setup_and_teardowns.h b/tests/libmemcached-1.0/setup_and_teardowns.h index fa6fbdf2..655cab44 100644 --- a/tests/libmemcached-1.0/setup_and_teardowns.h +++ b/tests/libmemcached-1.0/setup_and_teardowns.h @@ -60,3 +60,4 @@ test_return_t pre_replication(memcached_st*); test_return_t pre_replication_noblock(memcached_st*); test_return_t pre_settimer(memcached_st*); test_return_t pre_unix_socket(memcached_st*); +test_return_t pre_buffer(memcached_st*);