Skip Menu |

This queue is for tickets about the CGI-Application-Plugin-Stream CPAN distribution.

Report information
The Basics
Id: 81646
Status: resolved
Priority: 0/
Queue: CGI-Application-Plugin-Stream

People
Owner: PURDY [...] cpan.org
Requestors: ANDK [...] cpan.org
Cc: gregoa [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.10
Fixed in: (no value)



Subject: Test failures due to hash randomisation in perl 5.17.6
Since bleadperl v5.17.5-518-g7dc8663 your tests are failing frequently. That commit introduced hash key randomization and it seems at least the test t/basic.t is hit by that. Find a sample fail report at: http://www.cpantesters.org/cpan/report/dc58cc98-3295-11e2-bda6-23aba290f8f5 You can read more about the change at http://perl5.git.perl.org/perl.git/commit/7dc8663964c66a698d31bbdc8e8abed69bddeec3 or at http://www.perlmonks.org/?node_id=1005122 You may have to run the test several times until the randomization causes a fail. HTH&&Thanks&&Regards,
From: ppisar [...] redhat.com
Dne Ne 02.pro.2012 08:31:54, ANDK napsal(a): Show quoted text
> Since bleadperl v5.17.5-518-g7dc8663 your tests are failing > frequently. > That commit introduced hash key randomization and it seems at least > the test > > t/basic.t > > is hit by that. Find a sample fail report at: > > http://www.cpantesters.org/cpan/report/dc58cc98-3295-11e2-bda6- > 23aba290f8f5 > > You can read more about the change at > http://perl5.git.perl.org/perl.git/commit/7dc8663964c66a698d31bbdc8e8abed69bddeec3 > or at http://www.perlmonks.org/?node_id=1005122 > > You may have to run the test several times until the randomization > causes a fail. > > HTH&&Thanks&&Regards,
I cannot see any code in this CGI::Application::Plugin::Stream that would relied on a hash keys ordering. All hash manipulation is done via CGI::Application. I rather see problems in the the t/lib/TieOut.pm which do the serialization for the failing test.
Patch from Niko Tyni attached. Cheers, gregor, Debian Perl Group
Subject: 0001-Fix-a-test-failure-due-triggered-by-hash-randomizati.patch
From 033197cf2fb313209711a25cef2e15ae74c5b7ff Mon Sep 17 00:00:00 2001 From: Niko Tyni <ntyni@debian.org> Date: Tue, 13 Aug 2013 16:05:10 +0000 Subject: [PATCH] Fix a test failure due triggered by hash randomization changes in Perl 5.17.6 Quoting the CGI.pm documentation for the header() method: Each argument name is preceded by a dash. Neither case nor order matters in the argument list. -type, -Type, and -TYPE are all acceptable. In fact, only the first argument needs to begin with a dash. If a dash is present in the first argument, CGI.pm assumes dashes for the subsequent ones. The stream_file() method in CGI::Application::Plugin::Stream uses this method, and when 'Content_length' happens to be the first key in the argument hash, it is erroneously interpreted as the document type, not as the name of the tag. --- t/basic.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/basic.t b/t/basic.t index 3cb0f2e..e2c37f0 100644 --- a/t/basic.t +++ b/t/basic.t @@ -60,7 +60,7 @@ like($content_sent, qr/Content-Length: 29/i,$test_name); $test_name = 'Setting a custom Content-Length'; $app = StreamTest->new(); -$app->header_props(Content_Length => 1 ); +$app->header_props(-Content_Length => 1 ); $app->with_fh(); $content_sent = $stdout->read; like($content_sent, qr/Content-Length: 1/i,$test_name); -- 1.8.4.rc2
From: dsteinbrunner [...] pobox.com
On Tue Aug 13 14:05:25 2013, GREGOA wrote: Show quoted text
> Patch from Niko Tyni attached.
I can confirm this fix. Please apply and release.
I just uploaded 2.11, which adds the hyphen to the test script. Thanks for your help, Niko & reporters. :)