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)
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)
Severity: minor but it will also depend of the underlying cause.
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$
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.
TODO use Time::Fake to reproduce instead of changing date.
When you managed to make it fail, share the patch to make sure it fails for someone else as well.
Seem to have happened the 2020-06-23 https://jenkins.koha-community.org/view/19.05/job/Koha_19.05_D9/243/consoleText https://jenkins.koha-community.org/view/19.05/job/Koha_19.05_U18/246/consoleText 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.
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/Circulation.t#L3100 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.
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.
I works! thanks a lot and sorry for the delay.
Backported to 19.05.x branch for 19.05.17