Bugzilla – Attachment 102152 Details for
Bug 22001
Add RaiseError and PrintError flags for all tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22001: Errors are no longer logged by default (!)
Bug-22001-Errors-are-no-longer-logged-by-default-.patch (text/plain), 2.29 KB, created by
Jonathan Druart
on 2020-03-31 15:59:16 UTC
(
hide
)
Description:
Bug 22001: Errors are no longer logged by default (!)
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-31 15:59:16 UTC
Size:
2.29 KB
patch
obsolete
>From 13f3d0456fbdb52e5bb307c1a417a4a1dec93804 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 31 Mar 2020 17:56:41 +0200 >Subject: [PATCH] Bug 22001: Errors are no longer logged by default (!) > >This is one of the biggest part we will have to deal with when we will >switch to DBIC handler for UI as well. >The DBI errors will not be logged if we do not deal with them correctly. >--- > t/db_dependent/Koha/Objects.t | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) > >diff --git a/t/db_dependent/Koha/Objects.t b/t/db_dependent/Koha/Objects.t >index 891f30f393..5bb663030f 100644 >--- a/t/db_dependent/Koha/Objects.t >+++ b/t/db_dependent/Koha/Objects.t >@@ -579,7 +579,7 @@ subtest 'Return same values as DBIx::Class' => sub { > > subtest 'Koha::Objects->delete' => sub { > >- plan tests => 9; >+ plan tests => 7; > > my ( $r_us, $e_us, $r_them, $e_them ); > >@@ -687,11 +687,7 @@ subtest 'Return same values as DBIx::Class' => sub { > } > ); > >- warning_like { >- try { $r_us = $patrons->delete; } catch { $e_us = $_ }; >- } >- qr{DBD::mysql::st execute failed: Cannot delete or update a parent row: a foreign key constraint fails}, >- "Foreign key constraint DBI error should be logged"; >+ try { $r_us = $patrons->delete; } catch { $e_us = $_ }; > my $not_deleted_us = $patron_1->in_storage + $patron_2->in_storage + $patron_3->in_storage; > > $patron_1 = $builder->build_object({ class => 'Koha::Patrons' }); >@@ -717,11 +713,7 @@ subtest 'Return same values as DBIx::Class' => sub { > } > ); > >- warning_like { >- try { $r_them = $patrons->delete; } catch { $e_them = $_ }; >- } >- qr{DBD::mysql::st execute failed: Cannot delete or update a parent row: a foreign key constraint fails}, >- "Foreign key constraint DBI error should be logged"; >+ try { $r_them = $patrons->delete; } catch { $e_them = $_ }; > > my $not_deleted_them = $patron_1->in_storage + $patron_2->in_storage + $patron_3->in_storage; > ok( >-- >2.20.1
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 22001
:
83230
|
83231
|
83232
|
98910
|
98911
|
98912
|
99589
|
99590
|
99591
|
101989
|
101990
|
101991
|
102070
|
102140
|
102147
|
102149
|
102150
|
102151
| 102152