X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Engine-STOMP.git;a=blobdiff_plain;f=t%2FCatalyst-Engine-Stomp.t;h=ea2e699860d2e1d5b01147425f00727658a55e29;hp=9c4f1482ade219ffb5fed356dfedd736e90af45b;hb=a0c8e88568223a59b3ab88463fb12e6fb8b0ff64;hpb=092efce50c2eb38b07016f2c72bc28a79fc40825 diff --git a/t/Catalyst-Engine-Stomp.t b/t/Catalyst-Engine-Stomp.t index 9c4f148..ea2e699 100644 --- a/t/Catalyst-Engine-Stomp.t +++ b/t/Catalyst-Engine-Stomp.t @@ -11,24 +11,30 @@ use Data::Dumper; use Alien::ActiveMQ; my $ACTIVEMQ_VERSION = '5.2.0'; -unless (Alien::ActiveMQ->is_version_installed($ACTIVEMQ_VERSION)) { - plan 'skip_all' => 'No ActiveMQ server installed by Alien::ActiveMQ, try running the "install-activemq" command'; - exit; -} -my $mq = Alien::ActiveMQ->run_server($ACTIVEMQ_VERSION); - -my $stomp; +my ($stomp, $mq); eval { $stomp = Net::Stomp->new( { hostname => 'localhost', port => 61613 } ); }; if ($@) { - plan 'skip_all' => 'No ActiveMQ server listening on 61613: ' . $@; - exit; -} -else { - plan tests => 12; + + unless (Alien::ActiveMQ->is_version_installed($ACTIVEMQ_VERSION)) { + plan 'skip_all' => 'No ActiveMQ server installed by Alien::ActiveMQ, try running the "install-activemq" command'; + exit; + } + + $mq = Alien::ActiveMQ->run_server($ACTIVEMQ_VERSION); + + eval { + $stomp = Net::Stomp->new( { hostname => 'localhost', port => 61613 } ); + }; + if ($@) { + plan 'skip_all' => 'No ActiveMQ server listening on 61613: ' . $@; + exit; + } } +plan tests => 12; + # First fire off the server $SIG{CHLD} = 'IGNORE'; unless (fork()) {