Bug 24396 - Suggestions.t is failing with MySQL 8
Summary: Suggestions.t is failing with MySQL 8
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 23996
  Show dependency treegraph
 
Reported: 2020-01-10 10:30 UTC by Jonathan Druart
Modified: 2021-06-14 21:28 UTC (History)
2 users (show)

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


Attachments
Bug 24396: Fix Suggestions.t with MySQL 8 (1.12 KB, patch)
2020-01-10 10:31 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24396: Fix Suggestions.t with MySQL 8 (1.19 KB, patch)
2020-01-10 10:41 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2020-01-10 10:30:02 UTC
#   Failed test 'DelSuggestion deletes the correct suggestion'
#   at t/db_dependent/Suggestions.t line 413.
#          got: 'my title 3'
#     expected: 'my deleted title'
t/db_dependent/Suggestions.t .. 112/113 # Looks like you failed 1 test of 113.
Comment 1 Jonathan Druart 2020-01-10 10:31:59 UTC
Created attachment 97176 [details] [review]
Bug 24396: Fix Suggestions.t with MySQL 8

#   Failed test 'DelSuggestion deletes the correct suggestion'
 #   at t/db_dependent/Suggestions.t line 413.
 #          got: 'my title 3'
 #     expected: 'my deleted title'
 t/db_dependent/Suggestions.t .. 112/113 # Looks like you failed 1 test of 113.

Suggestions were returned in the reverse order. Adding an ORDER BY clause fixes the problem.

Test plan:
 % prove t/db_dependent/Suggestions.t
must return green
Comment 2 Martin Renvoize (ashimema) 2020-01-10 10:41:27 UTC
Created attachment 97181 [details] [review]
Bug 24396: Fix Suggestions.t with MySQL 8

 #   Failed test 'DelSuggestion deletes the correct suggestion'
 #   at t/db_dependent/Suggestions.t line 413.
 #          got: 'my title 3'
 #     expected: 'my deleted title'
 t/db_dependent/Suggestions.t .. 112/113 # Looks like you failed 1 test of 113.

Suggestions were returned in the reverse order. Adding an ORDER BY clause fixes the problem.

Test plan:
 % prove t/db_dependent/Suggestions.t
must return green

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize (ashimema) 2020-01-10 10:42:03 UTC
Dang, that could be annoying if we have to add order by statements all over the place to appease mysql8!

Passing QA
Comment 4 Martin Renvoize (ashimema) 2020-01-10 10:57:45 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Joy Nelson 2020-01-30 23:56:25 UTC
Pushed to 19.11.x branch for 19.11.03