Skip Menu |

This queue is for tickets about the Mail-Log-Trace CPAN distribution.

Report information
The Basics
Id: 108964
Status: patched
Worked: 10 min
Priority: 0/
Queue: Mail-Log-Trace

People
Owner: DStaal [...] usa.net
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: t/020_set_and_get.t fails randomly
See http://matrix.cpantesters.org/?dist=Mail-Log-Trace%201.0101 for a test report overview. Test output looks like this: # Failed test 'Mail::Log::Exceptions _parse_args test 3.' # at t/020_set_and_get.t line 150. # Compared $data->{"to_address"}[0] # got : 'example2@example.com' # expect : 'example@example.com' # Looks like you failed 1 test of 132. t/020_set_and_get.t ...... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/132 subtests It happens only for newer perls, so the problem could be related to hash randomization.
I'll take a look. I remember looking at this once before, and I can't remember what my conclusion was. At the moment cpantesters is down, so I'll have to wait - I want to be able to see all of the reports.
Ok, yes it's to do with hash randomization. I have a patch in my github repository, but didn't feel a one-line fix on a test that wasn't failing every time was worth pushing a new version to CPAN. ;) I'm working another issue at the moment, and the fix will be rolled into that. Patch with the fix (and a bit of git-related noise...) attached to this ticket.
Subject: patch_commit_292e663686c5.patch
diff --git .gitignore .gitignore new file mode 100644 index 0000000000000000000000000000000000000000..16b0dd5a32820877139cda117413641cc32f4b81 --- /dev/null +++ .gitignore @@ -0,0 +1,6 @@ +/_build +/blib +/Build +/Makefile +/MYMETA.json +/MYMETA.yml diff --git t/020_set_and_get.t t/020_set_and_get.t index dd93628e392bd24b63dc92ee922cdcc6f9305a05..606d59a4fc0c4905c31a6d92f4a0ae5d3bffb351 100644 --- t/020_set_and_get.t +++ t/020_set_and_get.t @@ -147,7 +147,7 @@ $result = $object->_parse_args({from_address => 'example@example.com'}); cmp_deeply($result, {to_address => undef, sent_time => undef, recieved_time => undef, relay => undef, from_address => 'example@example.com', message_id => undef, from_start => bool(0), subject => undef}, 'Mail::Log::Exceptions _parse_args test 2.'); $object = Mail::Log::Trace->new({'log_file' => 't/data/log'}); $result = $object->_parse_args({to_address => [qw(example@example.com example2@example.com)]}); -cmp_deeply($result, {to_address => [qw(example@example.com example2@example.com)], sent_time => undef, recieved_time => undef, relay => undef, from_address => undef, message_id => undef, from_start => bool(0), subject => undef}, 'Mail::Log::Exceptions _parse_args test 3.'); +cmp_deeply($result, {to_address => bag(qw(example@example.com example2@example.com)), sent_time => undef, recieved_time => undef, relay => undef, from_address => undef, message_id => undef, from_start => bool(0), subject => undef}, 'Mail::Log::Exceptions _parse_args test 3.'); } @@ -183,7 +183,7 @@ is($object->_get_parser_class(), 'Mail::Log::Parse::Test', 'Mail::Log::Trace par POSTFIX: { my $object = Mail::Log::Trace::Postfix->new({'log_file' => 't/data/log'}); -# A quick re-test of the above... +# A quick re-test of the above... is($object->get_log(), 't/data/log', 'Mail::Log::Trace::Postfix inital log'); # Test overloads.