Bugzilla – Attachment 107829 Details for
Bug 26043
Holds.t is failing randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26043: Fix random failure from Holds.t
Bug-26043-Fix-random-failure-from-Holdst.patch (text/plain), 1.44 KB, created by
Martin Renvoize (ashimema)
on 2020-08-05 11:16:18 UTC
(
hide
)
Description:
Bug 26043: Fix random failure from Holds.t
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-08-05 11:16:18 UTC
Size:
1.44 KB
patch
obsolete
>From 9597a0bdd09a3e38e5666454d2cb3eb6c3a7fc58 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 22 Jul 2020 14:11:03 +0200 >Subject: [PATCH] Bug 26043: Fix random failure from Holds.t > > # Failed test 'Test ModReserveMinusPriority()' > # at t/db_dependent/Holds.t line 202. > # got: undef > # expected: '1605' > # Looks like you failed 1 test of 66. > >It is coming from Koha::Patron->holds that is ordering by reservedate, >so "sometimes" they are ordered in reverse (at least it's my >understanding of the problem). > >Test plan: >Run the test file several times (from 20 to 60x), it must never fail >with this patch > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Holds.t | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t >index bf9540573c..37da7b05f7 100755 >--- a/t/db_dependent/Holds.t >+++ b/t/db_dependent/Holds.t >@@ -199,7 +199,7 @@ $holds = $patron->holds; > my $reserveid = Koha::Holds->search({ biblionumber => $biblio->biblionumber, borrowernumber => $borrowernumbers[0] })->next->reserve_id; > ModReserveMinusPriority( $itemnumber, $reserveid ); > $holds = $patron->holds; >-is( $holds->next->itemnumber, $itemnumber, "Test ModReserveMinusPriority()" ); >+is( $holds->search({ itemnumber => $itemnumber })->count, 1, "Test ModReserveMinusPriority()" ); > > $holds = $biblio->holds; > $hold = $holds->next; >-- >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 26043
:
107178
| 107829