X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2FCatalyst-Engine-Stomp.t;h=9c4f1482ade219ffb5fed356dfedd736e90af45b;hb=092efce50c2eb38b07016f2c72bc28a79fc40825;hp=0145e28191cb33333e684ffc2388c76436b211f9;hpb=5c4a779304cf402d31fbe1ef6ad89a8f72c270d3;p=catagits%2FCatalyst-Engine-STOMP.git diff --git a/t/Catalyst-Engine-Stomp.t b/t/Catalyst-Engine-Stomp.t index 0145e28..9c4f148 100644 --- a/t/Catalyst-Engine-Stomp.t +++ b/t/Catalyst-Engine-Stomp.t @@ -8,6 +8,15 @@ use Net::Stomp; use YAML::XS qw/ Dump Load /; 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; eval { $stomp = Net::Stomp->new( { hostname => 'localhost', port => 61613 } ); @@ -23,13 +32,14 @@ else { # First fire off the server $SIG{CHLD} = 'IGNORE'; unless (fork()) { - system("$^X -Ilib -Itestapp/lib testapp/script/testapp_stomp.pl --oneshot"); + system("$^X -Ilib -Itestapp/lib testapp/script/stomptestapp_stomp.pl --oneshot"); exit 0; } -sleep 30; +print STDERR "server started, waiting for spinup..."; +sleep 20; # Now be a client to that server - +print STDERR "testing\n"; ok($stomp, 'Net::Stomp object'); my $frame = $stomp->connect();