Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (15 sloc) 0.591 kB
use Test::More;
use Test::Requires qw(Test::Memory::Cycle);
use Tatsumaki::MessageQueue;
my $channel = 'test1';
my $client_id = rand(1);
my $sub = Tatsumaki::MessageQueue->instance( $channel );
$sub->poll_once($client_id, sub { ok(1, 'got message') });
memory_cycle_ok( $sub, 'no leaks' );
my $pub = Tatsumaki::MessageQueue->instance( $channel );
$pub->publish({ data => 'hello' });
memory_cycle_ok( $sub, 'no leaks in subscriber' );
memory_cycle_ok( $pub, 'no leaks in publisher' );
# We''re actually relying on the poll_once test, hacky but not sure how to
# verify
done_testing;
Jump to Line
Something went wrong with that request. Please try again.