From 60f2851fbf579b4266b316567fbde641049073a2 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Sun, 15 Apr 2012 22:12:04 -0700 Subject: [PATCH] Next pass through generate tests. --- tests/libmemcached-1.0/all_tests.h | 5 +---- tests/libmemcached-1.0/setup_and_teardowns.cc | 7 +++++++ tests/libmemcached-1.0/setup_and_teardowns.h | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) 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*); -- 2.30.2