Skip Menu |

This queue is for tickets about the Pod-WSDL CPAN distribution.

Report information
The Basics
Id: 81571
Status: resolved
Priority: 0/
Queue: Pod-WSDL

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

Bug Information
Severity: Important
Broken in: 0.061
Fixed in: 0.062



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/11WSDL01basic.t is hit by that. Find a sample fail report at: http://www.cpantesters.org/cpan/report/3ba73e3a-31c1-11e2-86d3-b0dda290f8f5 You can read more about the commit at http://perl5.git.perl.org/perl.git/commit/7dc8663964c66a698d31bbdc8e8abed69bddeec3 You may have to run the test several times until the randomization causes a fail. HTH&&Thanks&&Regards,
Attached is a patch that fixes the problems caused by hash randomisation by using Test::XML's is_xml() for comparing XML strings. -- dam
Subject: fix-xml-comparison.patch
Description: use Test::XML for comparing XML strings Due to the hash randomisation feature in perl 5.17.5+, comparing the string representation of complex XML structures is very fragile, as the order of attribute serialization is no longer deterministic. Test::XML's is_xml() function solves this, by allowing order differences. Author: Damyan Ivanov <dmn@debian.org> Forwarded: yes Bug: https://rt.cpan.org/Public/Bug/Display.html?id=81571 Bug-Debian: http://bugs.debian.org/710981 --- a/t/11WSDL01basic.t +++ b/t/11WSDL01basic.t @@ -6,6 +6,7 @@ use lib length $0 > 10 ? substr $0, 0, l use strict; use warnings; use XML::XPath; +use Test::XML; eval { new Pod::WSDL(source => 'bla'); @@ -90,7 +91,7 @@ my $outputtest; my $tmp = $p->WSDL; $tmp =~ s/<!-- WSDL.*?-->\n//; -ok($outputtest eq $tmp, "Pretty works."); +is_xml($outputtest, $tmp, "Pretty works."); $outputtestFile = $0; $outputtestFile =~ s![^/]+$!outputtest002.xml!; @@ -108,8 +109,8 @@ my $outputtest2; $tmp = $p->WSDL(pretty => 0); $tmp =~ s/<!-- WSDL.*?-->\n//; #print "--->$tmp<---\n"; -ok($outputtest2 eq $tmp, "Switch pretty off works."); +is_xml($outputtest2, $tmp, "Switch pretty off works."); $tmp = $p->WSDL(pretty => 1); $tmp =~ s/<!-- WSDL.*?-->\n//; -ok($outputtest eq $tmp, "Switch pretty on works."); +is_xml($outputtest, $tmp, "Switch pretty on works."); --- a/META.yml +++ b/META.yml @@ -17,6 +17,7 @@ requires: IO::Scalar: 2.110 Pod::Text: 2.21 Test::More: 0.47 + Test::XML: 0 XML::Writer: 0.531 XML::XPath: 1.13 resources: --- a/Makefile.PL +++ b/Makefile.PL @@ -24,6 +24,7 @@ my %WriteMakefileArgs = ( 'IO::Scalar' => '2.110', 'Pod::Text' => '2.21', 'Test::More' => '0.47', + 'Test::XML' => 0, 'XML::Writer' => '0.531', 'XML::XPath' => '1.13' },