1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
Description: 04-cmds-kill.t: restart test MPD before exiting
This works around the following chain of events that lead to test failure:
.
(0) At the start of 40-cmds-kill.t, a test MPD is started by
Test::Corpus::Audio::MPD
.
(1) The test MPD is stopped by the test
.
(2) an END block in T:C:A:M tries to stop the test MPD, using system('mpd
--kill')
.
(3) that system() sets $? to 256, perhaps because there is no MPD process
running
.
(4) the $? is later detected by Test2::API as a failure and the test fails
.
What this patch does is to start a test MPD between (1) and (2) so that (3)
diesn't happen.
.
Another way to fix this is perhaps to localize $? in (2) so that it does not
fiddle with the test exit code.
.
Or maybe `mpd --kill` should not exit with 256 when there is no running MPD
Author: Damyan Ivanov <dmn@debian.org>
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=126902
Bug: https://rt.cpan.org/Ticket/Display.html?id=126902
--- a/t/40-cmds-kill.t
+++ b/t/40-cmds-kill.t
@@ -47,4 +47,5 @@ plan tests => 1;
POE::Component::Client::MPD->spawn;
My::Session->new;
POE::Kernel->run;
+start_test_mpd();
exit;
|