Bug 31598

Summary: Fix random failure on Jenkins for t/db_dependent/Upload.t
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Test SuiteAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: arthur.suzuki, lucas, victor
Version: Main   
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, 22.05.07, 21.11.14
Attachments: Bug 31598: Fix random failure on Jenkins for Upload.t

Description Marcel de Rooy 2022-09-22 08:09:25 UTC
From Jenkins D11

# Subtest: Test delete via UploadedFile as well as UploadedFiles
    1..10
    ok 1 - Add duplicate temporary file (file4)
    ok 2 - Delete successful
    ok 3 - File no longer found after delete
    ok 4 - Record also gone
    ok 5 - Delete successful
    ok 6 - File no longer found after delete
    not ok 7 - delete warns when file is missing
    ok 8 - Deleting record was successful
    ok 9 - Back to four uploads now
    ok 10 - Repeated delete unsuccessful
not ok 7 - Test delete via UploadedFile as well as UploadedFiles

Can be resolved easily.
Comment 1 Marcel de Rooy 2022-09-22 08:23:16 UTC
Created attachment 140843 [details] [review]
Bug 31598: Fix random failure on Jenkins for Upload.t

At some point the warn is made conditional for permanent
files. So it failed when TestBuilder picked a zero value
for permanent. Trivial fix.

Test plan:
Run t/db_dependent/Upload.t a few times

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2022-09-22 08:23:49 UTC
Heading straight for Tomas. Trivial test fix
Comment 3 Tomás Cohen Arazi 2022-09-22 11:25:24 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 4 Lucas Gass 2022-10-31 22:36:54 UTC
Backported to 22.05.x for upcoming 22.05.07 release
Comment 5 Arthur Suzuki 2022-11-14 16:32:50 UTC
applied to 21.11 for 21.11.14
Comment 6 Victor Grousset/tuxayo 2022-11-25 00:07:25 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.