[PATCH] Add test that checks that the "total body length" of the
response is >= the "extras length"
Todd Lipcon
todd at amiestreet.com
Thu Apr 3 16:02:13 UTC 2008
The protocol spec indicates that the "total body length" is equal to the sum
of the extras length, key length, and value length. Therefore it cannot be
< the extras_length.
This currently breaks 7 tests. Before my previous patch it broke 19. Some
cleanup is needed if the spec is indeed to be followed here.
---
server/t/binary.t | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/server/t/binary.t b/server/t/binary.t
index a23236b..0eee9b3 100755
--- a/server/t/binary.t
+++ b/server/t/binary.t
@@ -262,6 +262,8 @@ sub _handleSingleResponse {
Test::More::is($magic, ::RES_MAGIC_BYTE, "Got proper magic");
+ Test::More::cmp_ok($remaining, '>=', $extralen, "Total remaining includes extralen");
+
return ($opaque, "")
if $remaining == 0;
--
1.5.3.2
More information about the memcached
mailing list