Bugzilla – Attachment 149018 Details for
Bug 32710
UI/Form/Builder/Item.t is failing randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32710: Try to prevent UI/Form/Builder/Item.t to fail randomly
Bug-32710-Try-to-prevent-UIFormBuilderItemt-to-fai.patch (text/plain), 2.19 KB, created by
Jonathan Druart
on 2023-03-31 08:40:26 UTC
(
hide
)
Description:
Bug 32710: Try to prevent UI/Form/Builder/Item.t to fail randomly
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-03-31 08:40:26 UTC
Size:
2.19 KB
patch
obsolete
>From 285e2d46ada94d92c789de599bae6b47e925c81c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 31 Mar 2023 10:33:02 +0200 >Subject: [PATCH] Bug 32710: Try to prevent UI/Form/Builder/Item.t to fail > randomly > >See the FIXME, and commit 77a34e099a9f3bcef2076a4170e8c8d843c403eb >Actually we are doing the trick (of removing _) before we are creating >another itemtype, we need to do it right before we are comparing. > >Test plan: >Run in a loop, be patient, it failed for me (without the patch) at run >245 >--- > t/db_dependent/Koha/UI/Form/Builder/Item.t | 21 +++++++++++---------- > 1 file changed, 11 insertions(+), 10 deletions(-) > >diff --git a/t/db_dependent/Koha/UI/Form/Builder/Item.t b/t/db_dependent/Koha/UI/Form/Builder/Item.t >index caa538b7cc6..dedbb317751 100755 >--- a/t/db_dependent/Koha/UI/Form/Builder/Item.t >+++ b/t/db_dependent/Koha/UI/Form/Builder/Item.t >@@ -45,20 +45,21 @@ $cache->clear_from_cache("MarcSubfieldStructure-"); > # 952$t is linked with items.copynumber and is not repeatable > setup_mss(); > >-# FIXME Later in this script we are comparing itemtypes, ordered by their description. >-# MySQL and Perl don't sort _ identically. >-# If you have one itemtype BK and another one B_K, MySQL will sort B_K first when Perl will sort it last >-my @itemtypes = Koha::ItemTypes->search->as_list; >-for my $itemtype ( @itemtypes ) { >- my $d = $itemtype->description; >- $d =~ s|_||g; >- $itemtype->description($d)->store; >-} >- > subtest 'authorised values' => sub { > #plan tests => 1; > > my $biblio = $builder->build_sample_biblio({ value => {frameworkcode => ''}}); >+ >+ # FIXME Later in this script we are comparing itemtypes, ordered by their description. >+ # MySQL and Perl don't sort _ identically. >+ # If you have one itemtype BK and another one B_K, MySQL will sort B_K first when Perl will sort it last >+ my @itemtypes = Koha::ItemTypes->search->as_list; >+ for my $itemtype ( @itemtypes ) { >+ my $d = $itemtype->description; >+ $d =~ s|_||g; >+ $itemtype->description($d)->store; >+ } >+ > my $subfields = > Koha::UI::Form::Builder::Item->new( > { biblionumber => $biblio->biblionumber } )->edit_form; >-- >2.25.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 32710
:
149018
|
149020