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.
Created attachment 23895 [details] [review] 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>
Created attachment 23903 [details] [review] 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>
Created attachment 23908 [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.
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.
Pushed to master.
Patch pushed to 3.14.x, will be in 3.14.4.