Bug 32269

Summary: Circulation.t is failing randomly
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED FIXED QA Contact: Martin Renvoize <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: katrin.fischer, lucas, martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Bug Depends on:    
Bug Blocks: 25551    
Attachments: Bug 32269: Prevent Circulation.t to fail randomly
Bug 32269: Prevent Circulation.t to fail randomly
Bug 32269: Prevent Circulation.t to fail randomly

Description Jonathan Druart 2022-11-18 14:31:06 UTC
21:28:55 koha_1       |     #   Failed test 'Checkouts with auto-renewal can be renewed earliest on due date if no renewalbefore'
21:28:55 koha_1       |     #   at t/db_dependent/Circulation.t line 5683.
21:28:55 koha_1       |     #          got: '2022-11-17T20:25:30'
21:28:55 koha_1       |     #     expected: '2022-12-01T00:00:00'
21:28:55 koha_1       | 
21:28:55 koha_1       |     #   Failed test 'Checkouts with auto-renewal can be renewed earliest on due date if no renewalbefore'
21:28:55 koha_1       |     #   at t/db_dependent/Circulation.t line 5689.
21:28:55 koha_1       |     #          got: '2022-11-17T20:25:30'
21:28:55 koha_1       |     #     expected: '2022-12-01T23:59:00'
21:28:55 koha_1       |     # Looks like you failed 2 tests of 5.
Comment 1 Jonathan Druart 2022-11-18 14:32:56 UTC
Created attachment 144067 [details] [review]
Bug 32269: Prevent Circulation.t to fail randomly

Highlighted by Bug 32030: fix test builder for boolean

    #   Failed test 'Checkouts with auto-renewal can be renewed earliest on due date if no renewalbefore'
    #   at t/db_dependent/Circulation.t line 343.
    #          got: '2022-11-18T14:16:12'
    #     expected: '2022-12-02T00:00:00'

    #   Failed test 'Checkouts with auto-renewal can be renewed earliest on due date if no renewalbefore'
    #   at t/db_dependent/Circulation.t line 349.
    #          got: '2022-11-18T14:16:12'
    #     expected: '2022-12-02T23:59:00'
    # Looks like you failed 2 tests of 5

We were reaching return $now
Comment 2 Katrin Fischer 2022-11-19 20:02:02 UTC
Created attachment 144090 [details] [review]
Bug 32269: Prevent Circulation.t to fail randomly

Highlighted by Bug 32030: fix test builder for boolean

    #   Failed test 'Checkouts with auto-renewal can be renewed earliest on due date if no renewalbefore'
    #   at t/db_dependent/Circulation.t line 343.
    #          got: '2022-11-18T14:16:12'
    #     expected: '2022-12-02T00:00:00'

    #   Failed test 'Checkouts with auto-renewal can be renewed earliest on due date if no renewalbefore'
    #   at t/db_dependent/Circulation.t line 349.
    #          got: '2022-11-18T14:16:12'
    #     expected: '2022-12-02T23:59:00'
    # Looks like you failed 2 tests of 5

We were reaching return $now

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Martin Renvoize 2022-11-23 10:04:23 UTC
Created attachment 144192 [details] [review]
Bug 32269: Prevent Circulation.t to fail randomly

Highlighted by Bug 32030: fix test builder for boolean

    #   Failed test 'Checkouts with auto-renewal can be renewed earliest on due date if no renewalbefore'
    #   at t/db_dependent/Circulation.t line 343.
    #          got: '2022-11-18T14:16:12'
    #     expected: '2022-12-02T00:00:00'

    #   Failed test 'Checkouts with auto-renewal can be renewed earliest on due date if no renewalbefore'
    #   at t/db_dependent/Circulation.t line 349.
    #          got: '2022-11-18T14:16:12'
    #     expected: '2022-12-02T23:59:00'
    # Looks like you failed 2 tests of 5

We were reaching return $now

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Tomás Cohen Arazi 2022-11-23 12:48:21 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 5 Jonathan Druart 2023-01-18 16:22:04 UTC
Can you please backport random failure fixes?
Comment 6 Jonathan Druart 2023-01-18 16:22:31 UTC
*** Bug 32674 has been marked as a duplicate of this bug. ***
Comment 7 Jonathan Druart 2023-01-18 16:26:39 UTC
*** Bug 32670 has been marked as a duplicate of this bug. ***