[Bug 25665] New: test t/db_dependent/Circulation.t fails on a specific date
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 Bug ID: 25665 Summary: test t/db_dependent/Circulation.t fails on a specific date Change sponsored?: --- Product: Koha Version: 19.05 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: victor@tuxayo.net QA Contact: testopia@bugs.koha-community.org 2020-06-02 == Test plan == Warning: changing the system time to something too far in the past will disrupt HTTPS & TLS so you will have errors if you try to browse the web in parallel. And other software(like email clients) might pop errors. Nothing to worry about. 1. Set system date to 2020-06-01 (time: somewhere during that day) 2. prove t/db_dependent/Circulation.t 3. "All tests successful." 4. Set system date to 2020-06-02 (time: somewhere during that day) 5. prove t/db_dependent/Circulation.t 6. Fail 7. Set system date to 2020-06-03 (time: somewhere during that day) 8. "All tests successful." master : doesn't happen 19.11.x: doesn't happen 19.05.x: happens (v19.05.11) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 --- Comment #1 from Victor Grousset/tuxayo <victor@tuxayo.net> --- I tried very quickly to find if the test suite mentioned mocking time (to have a clean way to test) but I haven't found such thing. (will continue searching) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 --- Comment #2 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Severity: minor but it will also depend of the underlying cause. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24881 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 --- Comment #3 from Victor Grousset/tuxayo <victor@tuxayo.net> --- failure message: kohadev-koha@04fc7d250165:/kohadevbox/koha$ prove t/db_dependent/Circulation.t t/db_dependent/Circulation.t .. 43/46 # Failed test 'Hourly rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed Wednesdays (168h - 24h * 0.25u)' # at t/db_dependent/Circulation.t line 3245. # got: '30' # expected: '36' # Looks like you failed 1 test of 20. t/db_dependent/Circulation.t .. 44/46 # Failed test 'Incremented fee tests' # at t/db_dependent/Circulation.t line 3270. t/db_dependent/Circulation.t .. 45/46 # Looks like you failed 1 test of 46. t/db_dependent/Circulation.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/46 subtests Test Summary Report ------------------- t/db_dependent/Circulation.t (Wstat: 256 Tests: 46 Failed: 1) Failed test: 44 Non-zero exit status: 1 Files=1, Tests=46, 30 wallclock secs ( 0.10 usr 0.02 sys + 22.21 cusr 4.17 csys = 26.50 CPU) Result: FAIL kohadev-koha@04fc7d250165:/kohadevbox/koha$ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 --- Comment #4 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Patch of bug 24881 comment 1 is still in 19.05.x and isn't not the cause of this bug. A revert doesn't make the test output change. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 --- Comment #5 from Victor Grousset/tuxayo <victor@tuxayo.net> --- TODO use Time::Fake to reproduce instead of changing date. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- When you managed to make it fail, share the patch to make sure it fails for someone else as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |victor@tuxayo.net -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 --- Comment #7 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Seem to have happened the 2020-06-23 https://jenkins.koha-community.org/view/19.05/job/Koha_19.05_D9/243/consoleT... https://jenkins.koha-community.org/view/19.05/job/Koha_19.05_U18/246/console... https://jenkins.koha-community.org/job/Koha_19.05_D8/250/consoleText https://jenkins.koha-community.org/job/Koha_19.05_D9/244/consoleText Didn't find yet the time to write a failing test. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- I don't manage to use Time::Fake ... IIUC I should just replace this line: https://gitlab.com/koha-community/Koha/-/blob/19.05.x/t/db_dependent/Circula... By one of the following to decide the outcome of the test: my $dt = dt_from_string("2020-06-02 19:05"); # should fail my $dt = dt_from_string("2020-06-03 19:05"); # should work But it has no effect, I can still only decide the outcome of the test using system's time. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Victor, I recreate this error today. I have applied the 2 last patches from bug 23382 and the failure is fixed. You may want to backport them using this bug id to have things clear in the release note. So prefix the patch's title with "Bug 25665: (bug 23382 follow-up)" Let me know if you need help. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> --- I works! thanks a lot and sorry for the delay. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25665 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to oldoldstable Version(s)| |19.05.17 released in| | --- Comment #11 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported to 19.05.x branch for 19.05.17 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org