n = $db->connection;
$conn->disconnect;
$db = $redis->db;
$db->connection->write_p('PING')->wait;
isnt $db->connection, $conn, 'new connection when disconnected';
is $redis->{connections}++, 7, 'conn
->{pid} = -1;
isnt $redis->db->connection, $conn, 'new fork gets a new connecion';
undef $conn;
$redis->{pid} = $$;
$conn = $redis->_blocking_connection;
$redis->{pid} = -1;
isnt $redis->_bloc
diag $err;
note 'Blocking connection';
$db = $redis->db;
isnt $db->connection(1)->ioloop, Mojo::IOLoop->singleton, 'blocking connection';
isnt $db->connection(1)->ioloop, $db->connection(0)->ioloop,
ot reconnect events';
is @disconnect, $expected_reconnects, 'got disconnect events';
isnt $before_connect[0], $before_connect[1], 'fresh connection';
note 'reconnect disabled';
(@b
rs('response')}, 1, 'only one message subscriber';
undef $pubsub;
delete $redis->{pubsub};
isnt $redis->db->connection, $conn, 'pubsub connection cannot be re-used';
};
subtest 'json data' =>
"
for 'Premature connection close', 'Redis server has gone away', 'Redis server has gone away';
isnt $redis->_blocking_connection, $db->connection(1), 'fresh connection next time';
is $redis->_block