Bugzilla – Attachment 145401 Details for
Bug 28670
api/v1/patrons_holds.t is failing randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28670: Prevent api/v1/patrons_holds.t to fail randomly
Bug-28670-Prevent-apiv1patronsholdst-to-fail-rando.patch (text/plain), 1.97 KB, created by
Martin Renvoize (ashimema)
on 2023-01-18 16:08:08 UTC
(
hide
)
Description:
Bug 28670: Prevent api/v1/patrons_holds.t to fail randomly
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-01-18 16:08:08 UTC
Size:
1.97 KB
patch
obsolete
>From f909f927380bacbbe0bfa8cb51763ee76844c8db Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 18 Jan 2023 15:55:26 +0100 >Subject: [PATCH] Bug 28670: Prevent api/v1/patrons_holds.t to fail randomly > >12:01:12 koha_1 | # Failed test 'Holds retrieved' >12:01:12 koha_1 | # at t/db_dependent/api/v1/patrons_holds.t line 56. >12:01:12 koha_1 | # Structures begin differing at: >12:01:12 koha_1 | # $got->[0]{hold_id} = '256' >12:01:12 koha_1 | # $expected->[0]{hold_id} = '255' >12:01:12 koha_1 | # Looks like you failed 1 test of 9. >12:01:12 koha_1 | >12:01:12 koha_1 | # Failed test 'list() tests' >12:01:12 koha_1 | # at t/db_dependent/api/v1/patrons_holds.t line 70. > >This is a weird one, and the only solution I see it to force the order >we want to receive the holds. > >I guess we should not rely on an order if no order by clause is passed > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/api/v1/patrons_holds.t | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/t/db_dependent/api/v1/patrons_holds.t b/t/db_dependent/api/v1/patrons_holds.t >index e18de8cae56..523963b81f5 100755 >--- a/t/db_dependent/api/v1/patrons_holds.t >+++ b/t/db_dependent/api/v1/patrons_holds.t >@@ -53,7 +53,7 @@ subtest 'list() tests' => sub { > my $hold_1 = $builder->build_object({ class => 'Koha::Holds', value => { borrowernumber => $patron->id } }); > my $hold_2 = $builder->build_object({ class => 'Koha::Holds', value => { borrowernumber => $patron->id } }); > >- $t->get_ok("//$userid:$password@/api/v1/patrons/" . $patron->id . '/holds') >+ $t->get_ok("//$userid:$password@/api/v1/patrons/" . $patron->id . '/holds?_order_by=+me.hold_id') > ->status_is( 200, 'SWAGGER3.2.2' ) > ->json_is( '' => [ $hold_1->to_api, $hold_2->to_api ], 'Holds retrieved' ); > >-- >2.39.0
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 28670
:
145396
|
145398
| 145401