Bugzilla – Attachment 194560 Details for
Bug 41959
Holds queue builder doesn't always check all holds when using transport cost matrix
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41959: Unit tests
Bug-41959-Unit-tests.patch (text/plain), 1.76 KB, created by
Nick Clemens (kidclamp)
on 2026-03-05 20:48:24 UTC
(
hide
)
Description:
Bug 41959: Unit tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2026-03-05 20:48:24 UTC
Size:
1.76 KB
patch
obsolete
>From 5e24c7b89a7f4ad914dcf338e9ea71c8f1b289bb Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 5 Mar 2026 20:32:46 +0000 >Subject: [PATCH] Bug 41959: Unit tests > >This adds a test for the condition where there are 2 holds, 1 item, and the item cannot fulfill the first hold >--- > .../HoldsQueue/TransportCostOptimizations.t | 22 +++++++++++++++++-- > 1 file changed, 20 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/HoldsQueue/TransportCostOptimizations.t b/t/db_dependent/HoldsQueue/TransportCostOptimizations.t >index 21e3b923f86..ab936fff1b5 100755 >--- a/t/db_dependent/HoldsQueue/TransportCostOptimizations.t >+++ b/t/db_dependent/HoldsQueue/TransportCostOptimizations.t >@@ -9,7 +9,7 @@ > > use Modern::Perl; > >-use Test::More tests => 120; >+use Test::More tests => 123; > use Test::NoWarnings; > use Test::Warn; > use Data::Dumper; >@@ -193,7 +193,10 @@ sub test_allocation { > if ($expected_allocation) { > my @indices = allocation_indices( $libraries, $holds_queue ); > >- is( scalar(@indices), scalar(@$expected_allocation), "$label correct number of allocations" ); >+ is( >+ scalar(@indices), scalar(@$expected_allocation), >+ "$label correct number of allocations (" . scalar @$expected_allocation . ")" >+ ); > > # print STDERR Dumper(\@indices); > >@@ -349,6 +352,21 @@ test_allocation( > 2 > ); > >+test_allocation( >+ "more holds than items and items cannot fill all holds", >+ [ >+ [ 0, 1, 1, -1, 1 ], >+ [ -1, 0, -1, -1, 1 ], >+ [ -1, -1, 0, -1, -1 ], >+ [ -1, -1, -1, 0, -1 ], >+ [ -1, -1, -1, -1, 0 ] >+ ], >+ [ 1, 0, 0, 0, 0 ], >+ [ 0, 0, 0, 1, 1 ], >+ [ [ 0, 4 ] ], >+ 1 >+); >+ > test_allocation( > "large volume", > [ >-- >2.39.5
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 41959
: 194560 |
194561
|
194907