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'
Created attachment 67432 [details] [review] 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
Note: We should certainly add these values as default for TestBuilder
Created attachment 67481 [details] [review] 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 Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Test 100 hundred times before and after. Before it failed 6 times, after it did not. Command used: for i in {1..100}; do prove t/db_dependent/SIP/Patron.t | grep Failed; done
Created attachment 67682 [details] [review] 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 Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 67683 [details] [review] Bug 19386: [QA Follow-up] Remove some default values In the meantime bug 19403 added default nulls for gonenoaddress, lost and debarred. So these lines can be removed safely. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 17.11, thanks to everybody involved!
Pushed to 17.05.x, will be in 17.05.06.
These patches have been pushed to 16.11.x and will be in 16.11.14.
Pushed to 16.05.x, for 16.05.19 release