Bug 11470

Summary: Circulation_transfers.t can fail, spuriously
Product: Koha Reporter: Galen Charlton <gmcharlt>
Component: Test SuiteAssignee: Chris Cormack <chris>
Status: CLOSED FIXED QA Contact: Galen Charlton <gmcharlt>
Severity: minor    
Priority: P5 - low CC: fridolin.somers
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 11470: fix occassional spurious test failure in Circulation_transfers.t
Bug 11470: fix occassional spurious test failure in Circulation_transfers.t
[PASSED QA] Bug 11470: fix occassional spurious test failure in Circulation_transfers.t
[PASSED QA] Bug 11470: fix occassional spurious test failure in Circulation_transfers.t

Description Galen Charlton 2014-01-02 18:01:58 UTC
Circulation_transfers.t creates some branch transfers, then compares them with expected values.  However, some of the tests can fail if enough time happens to pass between the creation of the transfers and the comparison, making the datesent values different.
Comment 1 Galen Charlton 2014-01-02 18:06:08 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2014-01-05 00:46:28 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-01-05 21:10:12 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2014-01-05 21:10:40 UTC
Created attachment 23909 [details] [review]
[PASSED QA] Bug 11470: fix occassional spurious test failure in Circulation_transfers.t

This patch makes Circulation_transfers.t no longer be sensitive to
the exact time it runs, avoiding spurious test failures due
to datesent being a second off between the creation of the test
transfer and the comparison.

To test:

[1] To simulate the failure, add a "sleep(2);" after the
    "#Test GetTransfers" comment and run
    prove -v t/db_dependent/Circulation_transfers.t
[2] Remove the sleep and apply the patch.
[3] Verify that prove -v t/db_dependent/Circulation_transfers.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.
Comment 5 Galen Charlton 2014-01-06 05:51:35 UTC
Pushed to master.
Comment 6 Fridolin Somers 2014-02-18 07:51:12 UTC
Patch pushed to 3.14.x, will be in 3.14.4.