Bugzilla – Attachment 67432 Details for
Bug 19386
t/db_dependent/SIP/Patron.t is failing randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19386: Prevent t/db_dependent/SIP/Patron.t to fail randomly
Bug-19386-Prevent-tdbdependentSIPPatront-to-fail-r.patch (text/plain), 2.65 KB, created by
Jonathan Druart
on 2017-09-28 20:33:32 UTC
(
hide
)
Description:
Bug 19386: Prevent t/db_dependent/SIP/Patron.t to fail randomly
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-09-28 20:33:32 UTC
Size:
2.65 KB
patch
obsolete
>From f8b9d6e77ca43e95907f1b3b9fb7dbe667131905 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 28 Sep 2017 17:31:04 -0300 >Subject: [PATCH] Bug 19386: Prevent t/db_dependent/SIP/Patron.t to fail > randomly > >Depending on the values used by TestBuilder, some tests from t/db_dependent/SIP/Patron.t can fail > > # Failed test 'Not blocked without overdues when set to 'Don't block'' > # at t/db_dependent/SIP/Patron.t line 55. > # got: '0' > # expected: '1' > > # Failed test 'Not blocked without overdues when set to 'confirmation'' > # at t/db_dependent/SIP/Patron.t line 61. > # got: '0' > # expected: '1' > > # Failed test 'Not blocked without overdues when set to 'Block'' > # at t/db_dependent/SIP/Patron.t line 67. > # got: '0' > # expected: '1' > >Caused by this check in C4::SIP::ILS::Patron->new >110 for (qw(EXPIRED CHARGES CREDITS GNA LOST DBARRED NOTES)) { >111 ($flags->{$_}) or next; >[...] >115 if ($flags->{$_}->{noissues}) { >116 foreach my $toggle (qw(charge_ok renew_ok recall_ok hold_ok inet)) { >117 $ilspatron{$toggle} = 0; # if we get noissues, disable everything >118 } >119 } >120 } > >Test plan: >Execute several times (50x?) these tests. >Without this patch they may fail >With this patch they must never fail >--- > t/db_dependent/SIP/Patron.t | 24 ++++++++++++++++++++++-- > 1 file changed, 22 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/SIP/Patron.t b/t/db_dependent/SIP/Patron.t >index 28009dffbe..cbcebb1276 100755 >--- a/t/db_dependent/SIP/Patron.t >+++ b/t/db_dependent/SIP/Patron.t >@@ -31,8 +31,28 @@ subtest "OverduesBlockCirc tests" => sub { > > plan tests => 6; > >- my $odue_patron = $builder->build({ source => 'Borrower' }); >- my $good_patron = $builder->build({ source => 'Borrower' }); >+ my $odue_patron = $builder->build( >+ { >+ source => 'Borrower', >+ value => { >+ debarred => undef, >+ dateexpiry => "3000-01-01", >+ lost => 0, >+ gonenoaddress => 0, >+ } >+ } >+ ); >+ my $good_patron = $builder->build( >+ { >+ source => 'Borrower', >+ value => { >+ debarred => undef, >+ dateexpiry => "3000-01-01", >+ lost => 0, >+ gonenoaddress => 0, >+ } >+ } >+ ); > my $odue = $builder->build({ source => 'Issue', value => { > borrowernumber => $odue_patron->{borrowernumber}, > date_due => '2017-01-01', >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19386
:
67432
|
67481
|
67682
|
67683