Bugzilla – Attachment 123293 Details for
Bug 28509
Koha/Acquisition/Orders.t is failing randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28509: Prevent Koha/Acquisition/Orders.t to fail randomly
Bug-28509-Prevent-KohaAcquisitionOrderst-to-fail-r.patch (text/plain), 2.21 KB, created by
Marcel de Rooy
on 2021-07-30 09:32:47 UTC
(
hide
)
Description:
Bug 28509: Prevent Koha/Acquisition/Orders.t to fail randomly
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-07-30 09:32:47 UTC
Size:
2.21 KB
patch
obsolete
>From 7f8a33e3cd52d82bbd072098da4d339cde72369d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 19 Jul 2021 14:35:11 +0200 >Subject: [PATCH] Bug 28509: Prevent Koha/Acquisition/Orders.t to fail randomly >Content-Type: text/plain; charset=utf-8 > >The random errors were: >03:25:39 koha_1 | # Structures begin differing at: >03:25:39 koha_1 | # $got->[0] = '10' >03:25:39 koha_1 | # $expected->[0] = '9' > >and > >16:36:15 koha_1 | # Structures begin differing at: >16:36:15 koha_1 | # $got->[0] = '100' >16:36:15 koha_1 | # $expected->[0] = '99' > >You see it coming? > >We sorted the ordernumbers alphabetically. > >Test plan: >0. Don't apply this patch >1. % git checkout v21.05.01 # The error is not appearing in master right now >2. Add 2 warn statements before the 'The 2 orders are returned' tests to >display $order_1->ordernumber and $order_2->ordernumber >3. MariaDB CLI > ALTER TABLE aqorders AUTO_INCREMENT=3; >4. prove t/db_dependent/Koha/Acquisition/Orders.t >=> Fail with > # Structures begin differing at: > # $got->[0] = '10' > # $expected->[0] = '9' >5. Apply this patch, repeat 3. and 4. >=> The test passes now. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Koha/Acquisition/Orders.t | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Acquisition/Orders.t b/t/db_dependent/Koha/Acquisition/Orders.t >index f363860b33..cf28bd07b7 100755 >--- a/t/db_dependent/Koha/Acquisition/Orders.t >+++ b/t/db_dependent/Koha/Acquisition/Orders.t >@@ -149,7 +149,7 @@ subtest 'filter_by_id_including_transfers() tests' => sub { > > $orders_rs = $orders_rs->filter_by_id_including_transfers({ ordernumber => $order_1->ordernumber }); > >- is_deeply( [ sort $orders_rs->get_column('ordernumber') ], [$order_1->ordernumber, $order_2->ordernumber ], 'The 2 orders are returned' ); >+ is_deeply( [ sort { $a <=> $b } $orders_rs->get_column('ordernumber') ], [$order_1->ordernumber, $order_2->ordernumber ], 'The 2 orders are returned' ); > > $orders_rs = $orders_rs->filter_by_id_including_transfers({ ordernumber => $order_2->ordernumber }); > >-- >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 28509
:
122942
| 123293