summaryrefslogtreecommitdiff
path: root/testapp.c
diff options
context:
space:
mode:
authorTrond Norbye <Trond.Norbye@sun.com>2009-09-02 23:23:57 +0200
committerDustin Sallings <dustin@spy.net>2009-09-02 16:08:18 -0700
commit52f16b3e0756c7cdf618a28dadb24eb5e5f58d7b (patch)
treeff66b0161f6e3f9e4c744303676718b1e59703a9 /testapp.c
parent6ae66c84ecac2be85f5cbead57c5d9fd7d373974 (diff)
downloadmemcached-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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/testapp.c b/testapp.c
index d3f068c..fe6e050 100644
--- a/testapp.c
+++ b/testapp.c
@@ -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;
}