Bugzilla – Attachment 116141 Details for
Bug 25670
Add useful methods to Koha::Acquisition::Orders
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25670: Fix random failure on Orders.t
Bug-25670-Fix-random-failure-on-Orderst.patch (text/plain), 1.87 KB, created by
Jonathan Druart
on 2021-02-01 09:37:24 UTC
(
hide
)
Description:
Bug 25670: Fix random failure on Orders.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-02-01 09:37:24 UTC
Size:
1.87 KB
patch
obsolete
>From 450995dd99fcbf14a3b01b10b06c39a652a0a36a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 1 Feb 2021 10:35:12 +0100 >Subject: [PATCH] Bug 25670: Fix random failure on Orders.t > >It has failed at least 3 times: > > # Failed test 'The right order is returned' > # at t/db_dependent/Koha/Acquisition/Orders.t line 153. > # got: '50' > # expected: '49' > > # Failed test 'The right order is returned' > # at t/db_dependent/Koha/Acquisition/Orders.t line 154. > # got: '49' > # expected: '50' > # Looks like you failed 2 tests of 6. > >I cannot manage to make it fail locally >--- > t/db_dependent/Koha/Acquisition/Orders.t | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Koha/Acquisition/Orders.t b/t/db_dependent/Koha/Acquisition/Orders.t >index 672ca1fa18..f363860b33 100755 >--- a/t/db_dependent/Koha/Acquisition/Orders.t >+++ b/t/db_dependent/Koha/Acquisition/Orders.t >@@ -121,7 +121,7 @@ subtest 'filter_by_active() tests' => sub { > > subtest 'filter_by_id_including_transfers() tests' => sub { > >- plan tests => 6; >+ plan tests => 4; > > $schema->storage->txn_begin; > >@@ -149,9 +149,7 @@ subtest 'filter_by_id_including_transfers() tests' => sub { > > $orders_rs = $orders_rs->filter_by_id_including_transfers({ ordernumber => $order_1->ordernumber }); > >- is( $orders_rs->count, 2, 'The two referenced orders are returned' ); >- is( $orders_rs->next->ordernumber, $order_1->ordernumber, 'The right order is returned' ); >- is( $orders_rs->next->ordernumber, $order_2->ordernumber, 'The right order is returned' ); >+ is_deeply( [ sort $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 25670
:
105534
|
105535
|
109859
|
109860
|
110643
|
110644
|
110700
|
110701
|
114940
|
114941
| 116141