Skip to content
This repository
tree: 82693b01f7
Fetching contributors…

Cannot retrieve contributors at this time

file 24 lines (16 sloc) 0.375 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
use strict;
use warnings;

use Test::More tests => 5;

use_ok('PocketIO::Pool');

my $pool = PocketIO::Pool->new;

ok !$pool->find_connection(123);

my $conn;
$pool->add_connection(
    sub {
        $conn = shift;
    }
);
ok $conn;

is $conn->id, $pool->find_connection($conn->id)->id;

$pool->remove_connection($conn->id, sub { });

ok !$pool->find_connection($conn->id);
Something went wrong with that request. Please try again.