Added rough subscriber code that works, lots of open issues
Signed-off-by: Pedro Melo <melo@simplicidade.org>
This commit is contained in:
28
t/10-reader.t
Executable file
28
t/10-reader.t
Executable file
@@ -0,0 +1,28 @@
|
||||
#!perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More;
|
||||
use AnyEvent;
|
||||
use AnyEvent::NSQ::Reader;
|
||||
|
||||
subtest 'basic connection' => sub {
|
||||
my $r = AnyEvent::NSQ::Reader->new(
|
||||
topic => 'test',
|
||||
channel => 'anyevent-nsq-reader-test',
|
||||
nsqd_tcp_addresses => '127.0.0.1',
|
||||
client_id => "10-reader.t/$$",
|
||||
|
||||
ready_count => 5,
|
||||
|
||||
message_cb => sub {
|
||||
print STDERR "!!!! GOT MESSAGE '$_[1]{message}\n";
|
||||
return;
|
||||
},
|
||||
);
|
||||
|
||||
AE::cv->recv;
|
||||
};
|
||||
|
||||
|
||||
done_testing();
|
||||
Reference in New Issue
Block a user