Bugzilla – Attachment 184079 Details for
Bug 40377
HoldsQueue/TransportCostOptimizations.t generates warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40377: Remove warnings from HoldsQueue/TransportCostOptimizations.t
Bug-40377-Remove-warnings-from-HoldsQueueTransport.patch (text/plain), 1.90 KB, created by
Jonathan Druart
on 2025-07-15 10:10:29 UTC
(
hide
)
Description:
Bug 40377: Remove warnings from HoldsQueue/TransportCostOptimizations.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-07-15 10:10:29 UTC
Size:
1.90 KB
patch
obsolete
>From c68fdc291d2c24225da7afb722216a0b8ea06628 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 15 Jul 2025 12:09:47 +0200 >Subject: [PATCH] Bug 40377: Remove warnings from > HoldsQueue/TransportCostOptimizations.t > >UseTransportCostMatrix set to yes, but matrix not populated at /kohadevbox/koha/C4/HoldsQueue.pm line 188. >UseTransportCostMatrix set to yes, but matrix not populated at /kohadevbox/koha/C4/HoldsQueue.pm line 188. > >It seems that they are expected, we simply need to catch them. >--- > .../HoldsQueue/TransportCostOptimizations.t | 43 ++++++++++++------- > 1 file changed, 27 insertions(+), 16 deletions(-) > >diff --git a/t/db_dependent/HoldsQueue/TransportCostOptimizations.t b/t/db_dependent/HoldsQueue/TransportCostOptimizations.t >index b11b3ba0739..933ab22e3fd 100755 >--- a/t/db_dependent/HoldsQueue/TransportCostOptimizations.t >+++ b/t/db_dependent/HoldsQueue/TransportCostOptimizations.t >@@ -9,7 +9,9 @@ > > use Modern::Perl; > >-use Test::More tests => 117; >+use Test::More tests => 120; >+use Test::NoWarnings; >+use Test::Warn; > use Data::Dumper; > > use C4::Context; >@@ -214,23 +216,32 @@ sub test_allocation { > > $schema->txn_rollback; > } >- >-test_allocation( >- "trivial case", >- [], >- [], >- [], >- [], >- 0 >+warning_like( >+ sub { >+ test_allocation( >+ "trivial case", >+ [], >+ [], >+ [], >+ [], >+ 0 >+ ); >+ }, >+ qr{UseTransportCostMatrix set to yes, but matrix not populated} > ); > >-test_allocation( >- "unit case", >- [ [0] ], >- [1], >- [1], >- [ [ 0, 0 ] ], >- 0 >+warning_like( >+ sub { >+ test_allocation( >+ "unit case", >+ [ [0] ], >+ [1], >+ [1], >+ [ [ 0, 0 ] ], >+ 0 >+ ); >+ }, >+ qr{UseTransportCostMatrix set to yes, but matrix not populated} > ); > > test_allocation( >-- >2.34.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 40377
:
184079
|
184246