When tests are ran, there are 2 warnings that are expected and raised by DBI. As they are expected they must be correctly caught and not displayed.
Created attachment 90278 [details] [review] Bug 23038: Hide expected warnings from tests When tests are ran, there are 2 warnings that are expected and raised by DBI. As they are expected they must be correctly caught and not displayed. We could have reconnect with PrintError turned off, but then reconnect with it on. Test plan: % prove t/db_dependent/Circulation/MarkIssueReturned.t t/db_dependent/Suggestions.t Must not display DBI warnings
Created attachment 90678 [details] [review] Bug 23038: Hide expected warnings from tests When tests are ran, there are 2 warnings that are expected and raised by DBI. As they are expected they must be correctly caught and not displayed. We could have reconnect with PrintError turned off, but then reconnect with it on. Test plan: % prove t/db_dependent/Circulation/MarkIssueReturned.t t/db_dependent/Suggestions.t Must not display DBI warnings Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
t/db_dependent/Circulation/MarkIssueReturned.t .. 2/3 # Failed test 'An exception is thrown on bad date' # at t/db_dependent/Circulation/MarkIssueReturned.t line 185. # expecting: Koha::Exceptions::Object::BadValue # found: DBIx::Class::Exception (DBIx::Class::Storage::DBI::_dbh_execute(): Incorrect datetime value: 'bad_date' for column `koha_master`.`issues`.`returndate` at row 1 at /usr/share/koha/Koha/Object.pm line 155 # ) # Looks like you failed 1 test of 3. t/db_dependent/Circulation/MarkIssueReturned.t .. 3/3 # Failed test 'Manually pass a return date' # at t/db_dependent/Circulation/MarkIssueReturned.t line 191. # Looks like you failed 1 test of 3.
Why is this failed, Marcel? It looks correct to me.
(In reply to Tomás Cohen Arazi from comment #4) > Why is this failed, Marcel? It looks correct to me. Comment3 and lack of response ?
All ok for me, could you please retest? kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/Circulation/MarkIssueReturned.t t/db_dependent/Circulation/MarkIssueReturned.t .. ok All tests successful. Files=1, Tests=3, 4 wallclock secs ( 0.01 usr 0.01 sys + 3.13 cusr 0.50 csys = 3.65 CPU) Result: PASS kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/Suggestions.t t/db_dependent/Suggestions.t .. ok All tests successful. Files=1, Tests=110, 7 wallclock secs ( 0.05 usr 0.01 sys + 5.26 cusr 1.26 csys = 6.58 CPU) Result: PASS
Hm, I see 2 QA script violations with this patch: FAIL t/db_dependent/Circulation/MarkIssueReturned.t FAIL critic # Variables::ProhibitUnusedVariables: Got 1 violation(s). FAIL t/db_dependent/Suggestions.t FAIL critic # Variables::ProhibitUnusedVariables: Got 1 violation(s). But all tests pass. Joubu, could you please take a look at those?
Created attachment 94041 [details] [review] Bug 23038: Remove unused stderr vars
Created attachment 94100 [details] [review] Bug 23038: Hide expected warnings from tests When tests are ran, there are 2 warnings that are expected and raised by DBI. As they are expected they must be correctly caught and not displayed. We could have reconnect with PrintError turned off, but then reconnect with it on. Test plan: % prove t/db_dependent/Circulation/MarkIssueReturned.t t/db_dependent/Suggestions.t Must not display DBI warnings Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 94101 [details] [review] Bug 23038: Remove unused stderr vars Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Nice work! Pushed to master for 19.11.00