tests: maxconns test when extstore enabled
seems to pass...
@@ -9,6 +9,18 @@ use lib "$Bin/lib";
use MemcachedTest;
my $server = new_memcached();
+test_maxconns($server);
+
+my $ext_path;
+if (supports_extstore()) {
+ $ext_path = "/tmp/extstore.$$";
+
+ my $server = new_memcached("-m 64 -U 0 -o ext_path=$ext_path:64m");
+ test_maxconns($server);
+}
+
+sub test_maxconns {
+ my $server = shift;
my $stat_sock = $server->sock;
my @sockets = ();
@@ -38,4 +50,10 @@ for my $s (@sockets) {
cmp_ok($stats->{rejected_connections}, '>', '1', 'rejected connections recorded');
$server->stop;
$stat_sock->close();
+}
+
done_testing();
+
+END {
+ unlink $ext_path if $ext_path;
+}
