Bugzilla – Attachment 145394 Details for
Bug 32650
Koha/Holds.t is failing randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32650: Prevent Koha/Holds.t to fail randomly
Bug-32650-Prevent-KohaHoldst-to-fail-randomly.patch (text/plain), 1.57 KB, created by
Jonathan Druart
on 2023-01-18 14:46:23 UTC
(
hide
)
Description:
Bug 32650: Prevent Koha/Holds.t to fail randomly
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-01-18 14:46:23 UTC
Size:
1.57 KB
patch
obsolete
>From 813defd463d4d83d4af8927d6fdb531e4e621576 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 18 Jan 2023 15:45:34 +0100 >Subject: [PATCH] Bug 32650: Prevent Koha/Holds.t to fail randomly > >22:25:51 koha_1 | # Failed test 'Items 1, 2, and 5 are available for filling the holds' >22:25:51 koha_1 | # at t/db_dependent/Koha/Holds.t line 531. >22:25:51 koha_1 | # Structures begin differing at: >22:25:51 koha_1 | # $got->[0] = '1000' >22:25:51 koha_1 | # $expected->[0] = '996' >22:25:51 koha_1 | # Looks like you failed 1 test of 6. >22:25:51 koha_1 | >22:25:51 koha_1 | # Failed test 'get_items_that_can_fill' >22:25:51 koha_1 | # at t/db_dependent/Koha/Holds.t line 539. > >We need to use a numeric sort, or 1000 is before 996... >--- > t/db_dependent/Koha/Holds.t | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Holds.t b/t/db_dependent/Koha/Holds.t >index 57f1d969350..4b859cfa3d6 100755 >--- a/t/db_dependent/Koha/Holds.t >+++ b/t/db_dependent/Koha/Holds.t >@@ -529,7 +529,7 @@ subtest 'get_items_that_can_fill' => sub { > } > ); > $items = $holds->get_items_that_can_fill; >- is_deeply( [ sort map { $_->itemnumber } $items->as_list ], >+ is_deeply( [ sort { $a <=> $b } map { $_->itemnumber } $items->as_list ], > [ $item_1->itemnumber, $item_2->itemnumber, $item_5->itemnumber ], 'Items 1, 2, and 5 are available for filling the holds' ); > > my $no_holds = Koha::Holds->new->empty(); >-- >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 32650
:
145394
|
145397
|
145402