Bug 34847

Summary: Search.t is failing if the DB has been upgraded
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, m.de.rooy
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.04,22.11.11
Circulation function:
Bug Depends on: 24274, 24458    
Bug Blocks: 34841    
Attachments: Bug 34847: Fix t/db_dependent/Search.t
Bug 34847: Fix t/db_dependent/Search.t

Description Jonathan Druart 2023-09-20 13:43:56 UTC
To recreate:
root@kohadevbox:koha$ perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only

kohadev-koha@kohadevbox:koha$ prove t/db_dependent/Search.t

[SKIP warnings]

    # Looks like you planned 94 tests but ran 44.
t/db_dependent/Search.t .. 1/3 
#   Failed test 'MARC21 + DOM'
#   at t/db_dependent/Search.t line 946.
main::run_marc21_search_tests(): DBI Exception: DBD::mysql::db do failed: Truncated incorrect DECIMAL value: '01e' at t/db_dependent/Search.t line 945
main::END(): DBI Exception: DBD::mysql::db do failed: Truncated incorrect DECIMAL value: '01e' at t/db_dependent/Search.t line 0
END failed--call queue aborted.
# Looks like your test exited with 11 just after 1.


Not sure how we can fix this one :-/
Comment 1 Jonathan Druart 2023-09-22 12:34:45 UTC
Created attachment 156083 [details] [review]
Bug 34847: Fix t/db_dependent/Search.t

If 01e still exists then the test will fail with
Truncated incorrect DECIMAL value: '01e' at t/db_dependent/Search.t line 945

Test plan:
% perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only
% prove t/db_dependent/Search.t
Comment 2 Marcel de Rooy 2023-09-22 12:52:36 UTC
Somebody on 24274 didnt want to remove 01e :)
Comment 3 Marcel de Rooy 2023-09-22 12:53:21 UTC
Created attachment 156088 [details] [review]
Bug 34847: Fix t/db_dependent/Search.t

If 01e still exists then the test will fail with
Truncated incorrect DECIMAL value: '01e' at t/db_dependent/Search.t line 945

Test plan:
% perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only
% prove t/db_dependent/Search.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Tomás Cohen Arazi (tcohen) 2023-09-22 13:56:24 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 5 Fridolin Somers 2023-09-22 19:20:33 UTC
Pushed to 23.05.x for 23.05.04
Comment 6 Matt Blenkinsop 2023-10-12 16:11:18 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x