Bug 19775

Summary: Search/History.t is failing randomly
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, nick
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 10933    
Bug Blocks: 25551    
Attachments: Bug 19775: Try & prevent Search/History.t to fail randomly

Description Jonathan Druart 2017-12-07 16:39:13 UTC
#   Failed test 'There are still 8 searches after calling delete with an interval = 6 days'
#   at t/db_dependent/Search/History.t line 185.
#          got: '6'
#     expected: '8'

#   Failed test 'There are still 2 searches after calling delete with an interval = 2 days'
#   at t/db_dependent/Search/History.t line 191.
#          got: '0'
#     expected: '2'
# Looks like you failed 2 tests of 27.
[15:04:12] t/db_dependent/Search/History.t
Comment 1 Jonathan Druart 2017-12-07 16:42:19 UTC
Created attachment 69618 [details] [review]
Bug 19775: Try & prevent Search/History.t to fail randomly

#   Failed test 'There are still 8 searches after calling delete with an interval = 6 days'
 #   at t/db_dependent/Search/History.t line 185.
 #          got: '6'
 #     expected: '8'

 #   Failed test 'There are still 2 searches after calling delete with an interval = 2 days'
 #   at t/db_dependent/Search/History.t line 191.
 #          got: '0'
 #     expected: '2'
 # Looks like you failed 2 tests of 27.
[15:04:12] t/db_dependent/Search/History.t

It looks like it does not longer fail with this change (date comparaison wrongly rounded to second in mysql?)
Comment 2 Jonathan Druart 2017-12-07 16:43:31 UTC
Pushed to master for 18.05
Comment 3 Nick Clemens 2017-12-14 18:18:55 UTC
Pushed to stable for 17.11.01, awesome work all!
Comment 4 Fridolin Somers 2017-12-21 09:54:56 UTC
Pushed to 17.05.x, will be in v17.05.07