Skip to content
This repository
tree: 0b1e10c480
Fetching contributors…

Cannot retrieve contributors at this time

file 17 lines (11 sloc) 0.371 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
use Test::More;
use Tatsumaki::MessageQueue;

my $channel = 'test1';
my $client_id = rand(1);

my $cv = AE::cv;
my $t = AE::timer 3, 0, sub { $cv->croak( "timeout" ); };

my $sub = Tatsumaki::MessageQueue->instance( $channel );
$sub->poll_once($client_id, sub { ok(1, 'long poll timeout'),
                                  $cv->send }, 1);


$cv->recv;

done_testing;
Something went wrong with that request. Please try again.