inway / mojo-rabbitmq-client

Mojo::IOLoop based RabbitMQ (AMQP) client
Artistic License 2.0
15 stars 17 forks source link

Changing to use of 'use' to avoid circular includes / redefines #21

Closed christopherraa closed 6 years ago

christopherraa commented 6 years ago

Should be able to close inway/mojo-rabbitmq-client#20 after applying this patch.

Same command run as mentioned in the issue:

for file in $( find lib/ -type f ); do perl -Ilib -c $file; done
lib/Mojo/RabbitMQ/Client.pm syntax OK
lib/Mojo/RabbitMQ/Client/Method.pm syntax OK
lib/Mojo/RabbitMQ/Client/Method/Publish.pm syntax OK
lib/Mojo/RabbitMQ/Client/Publisher.pm syntax OK
lib/Mojo/RabbitMQ/Client/Consumer.pm syntax OK
lib/Mojo/RabbitMQ/Client/LocalQueue.pm syntax OK
lib/Mojo/RabbitMQ/Client/Channel.pm syntax OK

Tests have also been run without incident.

christopherraa commented 6 years ago

I believe the failed build is due to some issue with Travis. I installed 5.22.0 locally and ran tests. Output:

$ perl -v

This is perl 5, version 22, subversion 0 (v5.22.0) built for x86_64-linux
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2015, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

$ prove 
t/base.t ........ ok   
t/localqueue.t .. ok     
t/publisher.t ... ok   
t/static.t ...... ok   
t/uri.t ......... ok     
t/use.t ......... ok   
All tests successful.
Files=6, Tests=117,  2 wallclock secs ( 0.06 usr  0.02 sys +  1.73 cusr  0.13 csys =  1.94 CPU)
Result: PASS

If possible please re-run tests to see if I in my commit indeed have an error on 5.22.0 or if it is intermittent failure in Travis / the test-suite.

SPodjasek commented 6 years ago

You're right builds 68 & 69 failed randomly on publisher.t, I'm investigating this issue currently. Travis runs additional on-line test on RabbitMQ server which is disabled by default (requires TEST_RMQ=1 in %ENV) and it fails...