summaryrefslogtreecommitdiff
path: root/t/slabs-reassign-chunked.t
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2016-07-12 22:54:41 -0700
committerdormando <dormando@rydia.net>2016-07-12 22:54:41 -0700
commit5627405fe0c299d96b541768f48cbf234ead6969 (patch)
tree36cff741e711a94bc01d71bb875465828b91bd07 /t/slabs-reassign-chunked.t
parent9c92c3a2100989f67b2b51c744f0d6c8c76d699e (diff)
downloadmemcached-5627405fe0c299d96b541768f48cbf234ead6969.tar.gz
fix test RAM bloat and more 32bit offsets.
when doing tests with long strings the results are buffered... so doing thousands of tests with long strings was using more than a gig of ram. now we just summarize if any were different. also fixes more offset stuff.
Diffstat (limited to 't/slabs-reassign-chunked.t')
-rw-r--r--t/slabs-reassign-chunked.t21
1 files changed, 15 insertions, 6 deletions
diff --git a/t/slabs-reassign-chunked.t b/t/slabs-reassign-chunked.t
index 2a104e2..e261577 100644
--- a/t/slabs-reassign-chunked.t
+++ b/t/slabs-reassign-chunked.t
@@ -49,12 +49,21 @@ my $todelete = 0;
# }
}
-for (my $x = 0; $x < 3; $x++) {
- print $sock "slabs reassign 17 0\r\n";
- my $res = scalar <$sock>;
- chomp $res;
-# print STDERR "SLABS REASSIGN RESULT: $res\n";
- sleep 1;
+{
+ my $s = mem_stats($sock, 'slabs');
+ my $sid;
+ # Find the highest ID to source from.
+ for my $k (keys %$s) {
+ next unless $k =~ m/^(\d+):/;
+ $sid = $s->{$k} if $s->{$k} > $1;
+ }
+ for (my $x = 0; $x < 3; $x++) {
+ print $sock "slabs reassign 17 0\r\n";
+ my $res = scalar <$sock>;
+ chomp $res;
+ # print STDERR "SLABS REASSIGN RESULT: $res\n";
+ sleep 1;
+ }
}
# Make room in old class so rescues can happen when we switch slab classes.