[memcached] bradfitz, r344: prepping for running on 1.1.x branch,
pr...
commits at code.sixapart.com
commits at code.sixapart.com
Mon Sep 4 06:11:16 UTC 2006
prepping for running on 1.1.x branch, preparing for failures
U trunk/server/test/lib/MemcachedTest.pm
Modified: trunk/server/test/lib/MemcachedTest.pm
===================================================================
--- trunk/server/test/lib/MemcachedTest.pm 2006-09-04 06:05:18 UTC (rev 343)
+++ trunk/server/test/lib/MemcachedTest.pm 2006-09-04 06:11:16 UTC (rev 344)
@@ -28,8 +28,14 @@
Test::More::is(scalar <$sock>, "END\r\n", $msg);
} else {
my $len = length($val);
- my $body = scalar(<$sock>) . scalar(<$sock>) . scalar(<$sock>);
- Test::More::is($body, "VALUE $key $expect_flags $len\r\n$val\r\nEND\r\n", $msg);
+ my $body = scalar(<$sock>);
+ my $expected = "VALUE $key $expect_flags $len\r\n$val\r\nEND\r\n";
+ if (!$body || $body =~ /^END/) {
+ Test::More::is($body, $expected, $msg);
+ return;
+ }
+ $body .= scalar(<$sock>) . scalar(<$sock>);
+ Test::More::is($body, $expected, $msg);
}
}
More information about the memcached-commits
mailing list