From: Eric Lambert Date: Fri, 13 Mar 2009 06:56:33 +0000 (+0900) Subject: minor tweaks to udp testcode and new error string X-Git-Tag: 0.27~19 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=6bd49a94f43c6ffe3b679f9470d266031d809bf9;p=awesomized%2Flibmemcached minor tweaks to udp testcode and new error string --- diff --git a/libmemcached/memcached_strerror.c b/libmemcached/memcached_strerror.c index 7b0e8d34..72e51fda 100644 --- a/libmemcached/memcached_strerror.c +++ b/libmemcached/memcached_strerror.c @@ -70,6 +70,8 @@ char *memcached_strerror(memcached_st *ptr __attribute__((unused)), memcached_re return "A TIMEOUT OCCURRED"; case MEMCACHED_BAD_KEY_PROVIDED: return "A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE"; + case MEMCACHED_INVALID_HOST_PROTOCOL: + return "THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT"; case MEMCACHED_MAXIMUM_RETURN: return "Gibberish returned!"; default: diff --git a/tests/function.c b/tests/function.c index 8cd48ead..91c12f7a 100644 --- a/tests/function.c +++ b/tests/function.c @@ -3213,7 +3213,9 @@ static test_return post_udp_op_check(memcached_st *memc, uint16_t *expected_req_ static memcached_return init_udp(memcached_st *memc) { memcached_version(memc); - if (memc->hosts[0].major_version != 1 || memc->hosts[0].minor_version != 2) + /* For the time being, only support udp test for >= 1.2.6 && < 1.3 */ + if (memc->hosts[0].major_version != 1 || memc->hosts[0].minor_version != 2 + || memc->hosts[0].micro_version < 6) return MEMCACHED_FAILURE; uint32_t num_hosts= memc->number_of_hosts; diff --git a/tests/output.res b/tests/output.res index 0f4b3fc7..ccdeef01 100644 --- a/tests/output.res +++ b/tests/output.res @@ -38,6 +38,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -71,6 +72,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -104,6 +106,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -137,6 +140,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -170,6 +174,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -203,6 +208,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -236,6 +242,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -269,6 +276,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -302,6 +310,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -335,6 +344,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -368,6 +378,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -401,6 +412,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -434,6 +446,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -467,6 +480,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -500,6 +514,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -533,6 +548,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -566,6 +582,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -599,6 +616,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT Error 0 -> SUCCESS Error 1 -> FAILURE Error 2 -> HOSTNAME LOOKUP FAILURE @@ -632,6 +650,7 @@ Error 29 -> FETCH WAS NOT COMPLETED Error 30 -> A TIMEOUT OCCURRED Error 31 -> ACTION QUEUED Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE +Error 33 -> THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT ketama_weighted:localhost|11221|1|160 ketama_weighted:localhost|11222|1|160 ketama_weighted:localhost|11223|1|160