Summary: | test t/db_dependent/Circulation.t fails on a specific date | ||
---|---|---|---|
Product: | Koha | Reporter: | Victor Grousset/tuxayo <victor> |
Component: | Test Suite | Assignee: | Victor Grousset/tuxayo <victor> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | jonathan.druart, lucas |
Version: | 19.05 | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24881 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
19.05.17
|
|
Circulation function: |
Description
Victor Grousset/tuxayo
2020-06-03 17:35:44 UTC
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 |