Skip Menu |

This queue is for tickets about the Class-Generate CPAN distribution.

Report information
The Basics
Id: 81623
Status: resolved
Priority: 0/
Queue: Class-Generate

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.11
Fixed in: 1.12



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/protected_members.t is hit by that. Find a sample fail report at: http://www.cpantesters.org/cpan/report/f9b54116-31d9-11e2-9b50-0ed5a290f8f5 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,
Subject: [PATCH] Patch to fix the problem.
Here is a patch to fix the problem courtesy of my work on the Mageia Linux distribution. Apply with patch -p0. Regards, -- Shlomi Fish
Subject: Class-Generate-fix-tests-in-perl-5.18.x.patch
--- t/protected_members.t.ORIG 2014-01-21 14:30:15.599866360 +0200 +++ t/protected_members.t 2014-01-21 14:30:23.199787242 +0200 @@ -85,7 +85,7 @@ '&set_asub' => '$prot_amem[$_[0]] = $_[1];', '&get_sub' => <<'EOS' { - my $hmem = '{' . join(',', map "$_=>$prot_hmem{$_}", keys %prot_hmem) . '}'; + my $hmem = '{' . join(',', map "$_=>$prot_hmem{$_}", sort { $a cmp $b } keys %prot_hmem) . '}'; my $amem = '[' . join(',', @prot_amem) . ']'; return "amem = $amem; hmem = $hmem"; }
On Tue Jan 21 07:41:33 2014, SHLOMIF wrote: Show quoted text
> Here is a patch to fix the problem courtesy of my work on the Mageia > Linux distribution. > > Apply with patch -p0. > > Regards, > > -- Shlomi Fish
Patch applied in 1.12. Closing this ticket - tests are OK now. Regards, — Shlomi Fish