Bugzilla – Attachment 122848 Details for
Bug 22690
Merging records with many items too slow (Elasticsearch)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22690: (QA follow-up) Silence manually generated warnings
Bug-22690-QA-follow-up-Silence-manually-generated-.patch (text/plain), 3.84 KB, created by
Martin Renvoize (ashimema)
on 2021-07-15 09:31:10 UTC
(
hide
)
Description:
Bug 22690: (QA follow-up) Silence manually generated warnings
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-07-15 09:31:10 UTC
Size:
3.84 KB
patch
obsolete
>From 693a6fdef2d5bffd132f772633b0f8666347a479 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi> >Date: Tue, 25 May 2021 18:09:30 +0300 >Subject: [PATCH] Bug 22690: (QA follow-up) Silence manually generated warnings >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >In our test setup we mock the index_records() to produce warnings like >this: > >Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line >93. > >By wrapping all our item creations to warnings_are{} we can silence them. > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Koha/SearchEngine/Indexer.t | 19 ++++++++++++++----- > 1 file changed, 14 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Koha/SearchEngine/Indexer.t b/t/db_dependent/Koha/SearchEngine/Indexer.t >index 47c3910864..8a7a31661e 100755 >--- a/t/db_dependent/Koha/SearchEngine/Indexer.t >+++ b/t/db_dependent/Koha/SearchEngine/Indexer.t >@@ -113,6 +113,10 @@ subtest 'Test indexer calls' => sub { > > my $item; > my $item2; >+ my $item3; >+ my $item4; >+ my $item5; >+ my $item6; > warnings_are{ > $item = $builder->build_sample_item({ > biblionumber => $biblio->biblionumber, >@@ -126,7 +130,16 @@ subtest 'Test indexer calls' => sub { > datelastseen => '2020-11-11', > replacementprice => 0 > }); >- } [$engine,"Koha::Item",$engine,"Koha::Item"], "index_records is called for $engine when adding an item (Item->store)"; >+ $item3 = $builder->build_sample_item({biblionumber => $biblio->biblionumber}); >+ $item4 = $builder->build_sample_item({biblionumber => $biblio->biblionumber}); >+ $item5 = $builder->build_sample_item({biblionumber => $biblio->biblionumber}); >+ $item6 = $builder->build_sample_item({biblionumber => $biblio->biblionumber}); >+ } [$engine,"Koha::Item", >+ $engine,"Koha::Item", >+ $engine,"Koha::Item", >+ $engine,"Koha::Item", >+ $engine,"Koha::Item", >+ $engine,"Koha::Item"], "index_records is called for $engine when adding an item (Item->store)"; > warnings_are{ > $item->store({ skip_record_index => 1 }); > } undef, "index_records is not called for $engine when adding an item (Item->store) if skip_record_index passed"; >@@ -163,8 +176,6 @@ subtest 'Test indexer calls' => sub { > AddReturn($item->barcode, $item->homebranch, 0, undef); > } [$engine,'C4::Circulation'], "index_records is called once for $engine when calling AddReturn if item not issued"; > >- my $item3 = $builder->build_sample_item({biblionumber => $biblio->biblionumber}); >- my $item4 = $builder->build_sample_item({biblionumber => $biblio->biblionumber}); > warnings_are{ > $item3->move_to_biblio($biblio2); > } [$engine,"Koha::Item"], "index_records is called for $engine when moving an item to another biblio (Item->move_to_biblio)"; >@@ -172,8 +183,6 @@ subtest 'Test indexer calls' => sub { > $item4->move_to_biblio($biblio2, { skip_record_index => 1 }); > } undef, "index_records is not called for $engine when moving an item to another biblio (Item->move_to_biblio) if skip_record_index passed"; > >- my $item5 = $builder->build_sample_item({biblionumber => $biblio->biblionumber}); >- my $item6 = $builder->build_sample_item({biblionumber => $biblio->biblionumber}); > warnings_are{ > $biblio2->adopt_items_from_biblio($biblio); > } [$engine,"Koha::Biblio",$engine,"Koha::Biblio"], "index_records is called for both biblios for $engine when adopting items (Biblio->adopt_items_from_biblio)"; >-- >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 22690
:
90061
|
90115
|
90116
|
92828
|
94505
|
97696
|
98143
|
98210
|
98211
|
99376
|
99379
|
100316
|
104796
|
104797
|
104871
|
105445
|
106144
|
108777
|
109694
|
110991
|
110994
|
111196
|
111207
|
111236
|
111237
|
112100
|
112184
|
112567
|
112569
|
112754
|
113308
|
113309
|
113941
|
113942
|
113967
|
113968
|
118226
|
118227
|
118229
|
118231
|
118391
|
119433
|
119434
|
120820
|
120821
|
120852
|
120853
|
121389
|
121392
|
121474
|
121516
|
121517
|
121518
|
121519
|
121520
|
122846
|
122847
|
122848
|
122849
|
122850
|
122886
|
122887
|
122888
|
122889
|
122890
|
122936
|
122938
|
122939
|
123029
|
123030
|
123031
|
123032
|
123033
|
123034
|
123035
|
123036
|
123037
|
123038
|
123039
|
123040
|
123041
|
123042
|
123044
|
123062
|
123481
|
123482
|
123483
|
123484
|
123485
|
123486
|
123487
|
123488
|
123489
|
123490
|
123491
|
123492
|
123493
|
123494
|
123495
|
123496
|
123497
|
124176
|
124188
|
124257