diff options
author | dormando <dormando@rydia.net> | 2012-01-11 16:39:22 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2012-01-11 16:50:31 -0800 |
commit | 96c07ae7758646fdb5a0eaa94e81ad2a7b579efe (patch) | |
tree | 5909c13b523aa0ab2fbd574ceac9255a6c2b59f3 | |
parent | 3b961388d14f9fa8516d388e96f95c1b798c41d3 (diff) | |
download | memcached-96c07ae7758646fdb5a0eaa94e81ad2a7b579efe.tar.gz |
test for the error code, not the full message
bad practice.
-rw-r--r-- | t/slabs_reassign.t | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/slabs_reassign.t b/t/slabs_reassign.t index aac83fc..f06b0dc 100644 --- a/t/slabs_reassign.t +++ b/t/slabs_reassign.t @@ -54,12 +54,12 @@ ok($slabs_before->{"25:total_pages"} != $slabs_after->{"25:total_pages"}, # Try to move another slab, see that it complains print $sock "slabs reassign 31 25\r\n"; -is(scalar <$sock>, "NOTFULL dest class has spare memory\r\n", "Cannot re-run against class with empty space"); +like(scalar <$sock>, qr/^NOTFULL/, "Cannot re-run against class with empty space"); # Try to move a page backwards. Should complain that source class isn't "safe" # to move from. print $sock "slabs reassign 25 31\r\n"; -is(scalar <$sock>, "UNSAFE src class is in an unsafe state\r\n", "Cannot move an unsafe slab back"); +like(scalar <$sock>, qr/^UNSAFE/, "Cannot move an unsafe slab back"); # Try to insert items into both slabs print $sock "set bfoo51 0 0 70000\r\n", $bigdata, "\r\n"; |