diff options
author | Trond Norbye <Trond.Norbye@sun.com> | 2009-09-02 23:23:57 +0200 |
---|---|---|
committer | Dustin Sallings <dustin@spy.net> | 2009-09-02 16:08:18 -0700 |
commit | 52f16b3e0756c7cdf618a28dadb24eb5e5f58d7b (patch) | |
tree | ff66b0161f6e3f9e4c744303676718b1e59703a9 /testapp.c | |
parent | 6ae66c84ecac2be85f5cbead57c5d9fd7d373974 (diff) | |
download | memcached-52f16b3e0756c7cdf618a28dadb24eb5e5f58d7b.tar.gz |
binary set with cas does not return the new cas id
(dustin) I updated the perl test to check for this when it's doing CAS
stuff. Found some bugs in the perl test that took too long to fix.
Diffstat (limited to 'testapp.c')
-rw-r--r-- | testapp.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -892,6 +892,17 @@ static enum test_return test_binary_set_impl(const char *key, uint8_t cmd) { return test_binary_noop(); } + send.request.message.header.request.cas = receive.response.message.header.response.cas; + safe_send(send.bytes, len, false); + if (cmd == PROTOCOL_BINARY_CMD_SET) { + safe_recv_packet(receive.bytes, sizeof(receive.bytes)); + validate_response_header(&receive.response, cmd, + PROTOCOL_BINARY_RESPONSE_SUCCESS); + assert(receive.response.message.header.response.cas != send.request.message.header.request.cas); + } else { + return test_binary_noop(); + } + return TEST_PASS; } |