3 use namespace::autoclean;
5 after 'disconnect' => sub {
6 delete shift->{___activemq};
14 use Exporter qw/import/;
16 our $ACTIVEMQ_VERSION = '5.2.0';
18 our @EXPORT = qw/ start_server /;
23 $stomp = Net::Stomp->new( { hostname => 'localhost', port => 61613 } );
27 unless (Alien::ActiveMQ->is_version_installed($ACTIVEMQ_VERSION)) {
28 plan 'skip_all' => 'No ActiveMQ server installed by Alien::ActiveMQ, try running the "install-activemq" command';
32 $mq = Alien::ActiveMQ->run_server($ACTIVEMQ_VERSION);
35 $stomp = Net::Stomp->new( { hostname => 'localhost', port => 61613 } );
38 plan 'skip_all' => 'No ActiveMQ server listening on 61613: ' . $@;
43 $SIG{CHLD} = 'IGNORE';
45 system("$^X -Ilib -Itestapp/lib testapp/script/stomptestapp_stomp.pl --oneshot");
48 print STDERR "server started, waiting for spinup...";
51 $stomp->{___activemq} = $mq if $mq;
52 StompRole->meta->apply($stomp);