Skip Menu |

This queue is for tickets about the Params-Validate-Checks CPAN distribution.

Report information
The Basics
Id: 81430
Status: open
Priority: 0/
Queue: Params-Validate-Checks

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

Bug Information
Severity: Important
Broken in: 0.01
Fixed in: (no value)



Subject: Test failures due to hash randomisation in perl 5.17.6
Since bleadperl v5.17.5-518-g7dc8663 tests are failing frequently (not always). That commit introduced hash key randomization and it seems at least the test t/more_features.t was hit by that. Sample fail report: http://www.cpantesters.org/cpan/report/d0b22402-31a0-11e2-b017-8bfda290f8f5 You may have to run the test suite everal times until the randomization causes the test to fail. You can read more about the commit at http://perl5.git.perl.org/perl.git/commit/7dc8663964c66a698d31bbdc8e8abed69bddeec3 HTH&&Thanks&&Regards,
Thanks for the BBC, Andreas. Smylers, the problem is that more_features.t uses a check with multiple callbacks. Those callbacks are passed to Params::Check in a hash, and are then processed in hash order. So if an argument fails more than one callback check, the error reported depends on the order of the particular hash in question. My fix just makes the relevant test more lenient: it permits either of the two possible errors.
Subject: disregard_hash_ordering.diff
diff -ur Params-Validate-Checks-0.01.orig/Changes Params-Validate-Checks-0.01/Changes --- Params-Validate-Checks-0.01.orig/Changes 2008-02-10 23:37:47.000000000 +0000 +++ Params-Validate-Checks-0.01/Changes 2012-11-25 17:52:47.000000000 +0000 @@ -1,5 +1,10 @@ = Params-Validate-Checks Changes = +== 0.02 == + +* Fix RT#81430: intermittent test failures when run under newer Perl (with + different hash ordering); Aaron Crane <arc@cpan.org> + == 0.01 == * initial release diff -ur Params-Validate-Checks-0.01.orig/t/more_features.t Params-Validate-Checks-0.01/t/more_features.t --- Params-Validate-Checks-0.01.orig/t/more_features.t 2008-02-10 23:37:47.000000000 +0000 +++ Params-Validate-Checks-0.01/t/more_features.t 2012-11-25 17:51:03.000000000 +0000 @@ -44,7 +44,7 @@ 'optional argument can be omitted'; throws_ok { repeat(message => 'ooops', count => 2, suffix => "\n\n\n") } - qr/did not pass the 'one line' callback/, + qr/did not pass the '(?:one line|not empty)' callback/, 'complains if optional parameter supplied but invalid'; throws_ok { repeat(message => 'ooops', count => 2, suffix => undef) }