X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Flibmemcached-1.0%2Fparser.cc;h=064c5cfb9fc69f8d205c5d5cdc902497963871c4;hb=2de8026caaa36906661a315f18fdb81288990ea2;hp=a027f50e199c7038e3efee7d7b1f48ae59ab2a2f;hpb=850df1fbab46a5a658c2fd0c35164ef1c60a22d9;p=awesomized%2Flibmemcached diff --git a/tests/libmemcached-1.0/parser.cc b/tests/libmemcached-1.0/parser.cc index a027f50e..064c5cfb 100644 --- a/tests/libmemcached-1.0/parser.cc +++ b/tests/libmemcached-1.0/parser.cc @@ -35,7 +35,7 @@ * */ -#include +#include #include using namespace libtest; @@ -44,12 +44,12 @@ using namespace libtest; #include #include -#include -#include +#include +#include #include #include -#include "libmemcached/instance.h" +#include "libmemcached/instance.hpp" enum scanner_type_t { @@ -85,7 +85,7 @@ struct scanner_variable_t { // Check and make sure the first host is what we expect it to be static test_return_t __check_host(memcached_st *memc, const scanner_string_st &hostname) { - memcached_server_instance_st instance= + const memcached_instance_st * instance= memcached_server_instance_by_position(memc, 0); test_true(instance); @@ -356,7 +356,7 @@ test_return_t libmemcached_check_configuration_with_filename_test(memcached_st*) libmemcached_check_configuration(test_literal_param("--CONFIGURE-FILE=\"support/example.cnf\""), buffer, sizeof(buffer)), buffer); - test_compare_hint(MEMCACHED_SUCCESS, + test_compare_hint(MEMCACHED_PARSE_ERROR, libmemcached_check_configuration(test_literal_param("--CONFIGURE-FILE=support/example.cnf"), buffer, sizeof(buffer)), buffer); @@ -487,7 +487,7 @@ test_return_t random_statement_build_test(memcached_st*) { std::string random_options; - uint32_t number_of= random() % option_list.size(); + uint32_t number_of= random() % uint32_t(option_list.size()); for (uint32_t options= 0; options < number_of; options++) { size_t option_list_position= random() % option_list.size(); @@ -617,7 +617,7 @@ test_return_t random_statement_build_test(memcached_st*) } static memcached_return_t dump_server_information(const memcached_st *, - memcached_server_instance_st instance, + const memcached_instance_st * instance, void *) { if (strcmp(memcached_server_name(instance), "localhost")) @@ -667,7 +667,7 @@ struct socket_weight_t { }; static memcached_return_t dump_socket_information(const memcached_st *, - memcached_server_instance_st instance, + const memcached_instance_st * instance, void *context) { socket_weight_t *check= (socket_weight_t *)context; @@ -737,9 +737,6 @@ test_return_t test_parse_socket(memcached_st *) */ test_return_t regression_bug_71231153_connect(memcached_st *) { - if (libmemcached_util_ping("10.0.2.252", 0, NULL)) // If for whatever reason someone has a host at this address, skip - return TEST_SKIPPED; - { // Test the connect-timeout, on a bad host we should get MEMCACHED_CONNECTION_FAILURE memcached_st *memc= memcached(test_literal_param("--SERVER=10.0.2.252 --CONNECT-TIMEOUT=0")); test_true(memc); @@ -761,11 +758,6 @@ test_return_t regression_bug_71231153_connect(memcached_st *) test_return_t regression_bug_71231153_poll(memcached_st *) { - if (libmemcached_util_ping("10.0.2.252", 0, NULL)) // If for whatever reason someone has a host at this address, skip - { - return TEST_SKIPPED; - } - { // Test the poll timeout, on a bad host we should get MEMCACHED_CONNECTION_FAILURE memcached_st *memc= memcached(test_literal_param("--SERVER=10.0.2.252 --POLL-TIMEOUT=0")); test_true(memc);