Bug 16609 - Catch warning from Koha::Hold in Hold.t
Summary: Catch warning from Koha::Hold in Hold.t
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Marcel de Rooy
QA Contact: Galen Charlton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-27 12:07 UTC by Marcel de Rooy
Modified: 2017-12-07 22:17 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 16609: Catch warning from Koha::Hold in Hold.t (1.30 KB, patch)
2016-05-27 12:08 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 16609: Catch warning from Koha::Hold in Hold.t (1.33 KB, patch)
2016-05-31 14:00 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 16609: Catch warning from Koha::Hold in Hold.t (1.40 KB, patch)
2016-06-07 09:54 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2016-05-27 12:07:11 UTC

    
Comment 1 Marcel de Rooy 2016-05-27 12:08:47 UTC Comment hidden (obsolete)
Comment 2 Srdjan Jankovic 2016-05-30 05:29:48 UTC
That test is failing for me with
DBD::mysql::st execute failed: Field 'lowestPriority' doesn't have a default value [for Statement "INSERT INTO `reserves` ( `biblionumber`, `borrowernumber`, `branchcode`, `itemnumber`, `suspend`, `waitingdate`) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0='6644', 1='386', 2='EP3', 3='19635', 4=0, 5='2000-01-01'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1834.
DBIx::Class::Storage::DBI::_dbh_execute(): Field 'lowestPriority' doesn't have a default value at Koha/Object.pm line 109
Comment 3 Marcel de Rooy 2016-05-30 07:46:58 UTC
Srdjan,
Thx for testing. Strange that it fails. You seem to fail already before reaching my adjustment.  Should fail without my patch too?
I am not having any problem:

t/db_dependent/Hold.t .. ok
All tests successful.
Files=1, Tests=32,  2 wallclock secs ( 0.04 usr  0.01 sys +  1.38 cusr  0.10 csys =  1.53 CPU)
Result: PASS
Comment 4 Srdjan Jankovic 2016-05-30 23:20:03 UTC
Oh yes, definitely fails for me on the master branch, nothing to do with the patch.
Comment 5 Mark Tompsett 2016-05-31 14:00:26 UTC Comment hidden (obsolete)
Comment 6 Mark Tompsett 2016-05-31 14:01:48 UTC
(In reply to M. Tompsett from comment #5)
> NOTE: Nice clean up!
> 
> Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

This was on a fresh install.
Comment 7 Jonathan Druart 2016-06-07 09:54:01 UTC
Created attachment 52117 [details] [review]
Bug 16609: Catch warning from Koha::Hold in Hold.t

Before this patch, the suspend step triggers a warn from Koha::Hold.
Now we catch it.

Test plan:
Run the test. Do not see the warning about unable to suspend.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

NOTE: Nice clean up!

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Kyle M Hall (khall) 2016-06-10 17:42:29 UTC
Pushed to master for Koha 16.11, thanks Marcel!
Comment 9 Frédéric Demians 2016-06-15 07:47:58 UTC
Pushed in 16.05. Will be in 16.05.01.
Comment 10 Julian Maurice 2016-06-16 09:25:29 UTC
Not needed in 3.22.x