From a861e9c008ab9192521b61b10c555a0c86490b0b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 13 Jan 2021 17:14:37 +0100 Subject: [PATCH] Bug 26950: Fix SIP/Message.t t/db_dependent/SIP/Message.t .. 2/9 # Failed test 'DBIx error on duplicate issue_id' # at t/db_dependent/SIP/Message.t line 643. # found warning: DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '1' for key 'PRIMARY' [for Statement "INSERT INTO `old_issues` ( `auto_renew`, `auto_renew_error`, `borrowernumber`, `branchcode`, `date_due`, `issue_id`, `issuedate`, `issuer_id`, `itemnumber`, `lastreneweddate`, `note`, `notedate`, `noteseen`, `onsite_checkout`, `renewals`, `returndate`, `timestamp`, `unseen_renewals`) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" with ParamValues: 0=0, 1=undef, 2=57, 3='m_HHGh', 4=undef, 5=1, 6=undef, 7=undef, 8=973, 9=undef, 10=undef, 11=undef, 12=undef, 13=0, 14=0, 15='2021-01-14 16:12:47', 16='2021-01-13 16:12:48', 17=0] at /kohadevbox/koha/Koha/Object.pm line 169 # found carped warning: The checkin for the following issue failed, Please go to the about page and check all messages on the 'System information' to see if there are configuration / data issues (Duplicate ID)$VAR1 = { # expected to find warning: (?^u:Duplicate entry) # expected to find warning: (?^u:data corrupted) # Looks like you failed 1 test of 35. Signed-off-by: Jonathan Druart --- t/db_dependent/SIP/Message.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/db_dependent/SIP/Message.t b/t/db_dependent/SIP/Message.t index f3850f5b85..8315ccc7de 100755 --- a/t/db_dependent/SIP/Message.t +++ b/t/db_dependent/SIP/Message.t @@ -640,7 +640,7 @@ sub test_checkin_v2 { undef $response; $msg = C4::SIP::Sip::MsgType->new( $siprequest, 0 ); warnings_like { $msg->handle_checkin( $server ); } - [ qr/Duplicate entry/, qr/data corrupted/ ], + [ qr/Duplicate entry/, qr/data issues/ ], 'DBIx error on duplicate issue_id'; is( substr($response,2,1), '0', 'OK flag is false when we encounter data corruption in old_issues' ); is( substr($response,5,1), 'Y', 'Alert flag is set' ); -- 2.39.5