DST bugs in perl live tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
At certain times of the year, apparently around a change in daylight savings time, certain date-based perl tests will fail. Some of these tests are doing date math to set up relative dates. I'm not sure if the bug is there or actually in Evergreen, but I suspect it's within the tests themselves.
Here's an example of a test run that failed:
http://
And, in particular, the output from the perl live tests:
Sun Oct 26 16:26:59 EDT 2014
perl Build.PL --destdir || make -s build-perl-fail
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'OpenILS' version '2.4'
./Build test --test_files live_t || make -s build-perl-fail
# Simple tests against the open-ils.storage service and the stock test data.
Subroutine section_pkg redefined at (eval 1519) line 4.
live_t/00-simple.t .......
# Simple tests against the open-ils.auth service, memcached, and the stock test data.
Subroutine section_pkg redefined at (eval 1519) line 4.
live_t/01-auth.t .......
# Test circulation of item CONC70000345 against the admin user.
Subroutine section_pkg redefined at (eval 1519) line 4.
live_t/
# Test fine generation on checkin against the admin user.
Subroutine section_pkg redefined at (eval 1519) line 4.
# Failed test 'Thirteen bills associated with circulation'
# at live_t/
# got: '12'
# expected: '13'
# Looks like you failed 1 test of 20.
live_t/
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/20 subtests
# Test fine generation with closed date on checkin against the admin user.
Subroutine section_pkg redefined at (eval 1519) line 4.
# Failed test 'Twelve bills associated with circulation (instead of 13, thanks to closed date)'
# at live_t/
# got: '11'
# expected: '12'
# Looks like you failed 1 test of 23.
live_t/
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/23 subtests
# Test bill payment against the admin user.
Subroutine section_pkg redefined at (eval 1519) line 4.
# Failed test 'Both transactions combined have a balance owed of 1.25'
# at live_t/
# got: '1.15'
# expected: '1.25'
# Looks like you failed 1 test of 10.
live_t/
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/10 subtests
# Fetches and updates a bib records MARC data
Subroutine section_pkg redefined at (eval 1523) line 4.
live_t/
# Tests Anonymous PCRUD personality for CStoreEditor
Subroutine section_pkg redefined at (eval 1519) line 4.
live_t/
Test Summary Report
-------------------
live_t/
Failed test: 20
Non-zero exit status: 1
live_t/
Failed test: 22
Non-zero exit status: 1
live_t/
Failed test: 7
Non-zero exit status: 1
Files=8, Tests=84, 17 wallclock secs ( 0.06 usr 0.05 sys + 6.81 cusr 0.63 csys = 7.55 CPU)
Result: FAIL
Failed 3/8 test programs. 3/84 subtests failed.
>>> Build/test of Perl modules has failed. The most likely
>>> possibility is that a dependency is not pre-installed
>>> or that a test has failed.
>>> See the messages above this one for more information.
Return Value = 2
Changed in evergreen: | |
status: | New → In Progress |
tags: | removed: pullrequest |
Changed in evergreen: | |
assignee: | Jason Etheridge (phasefx) → nobody |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/collab/ phasefx/ fix_date_ math
commit bcca9cda6c299c8 9c22e88ff26c352 7c62d489d7
Author: Jason Etheridge <email address hidden>
Date: Fri Nov 7 13:00:10 2014 -0500
lp1386260 DST bugs in perl live tests
Use safer date math to handle bug with DST
Signed-off-by: Jason Etheridge <email address hidden>
diff --git a/Open- ILS/src/ perlmods/ live_t/ 03-overdue_ circ.t b/Open- ILS/src/ perlmods/ live_t/ 03-overdue_ circ.t ILS/src/ perlmods/ live_t/ 03-overdue_ circ.t ILS/src/ perlmods/ live_t/ 03-overdue_ circ.t
index 7981d32..fd83b2c 100644
--- a/Open-
+++ b/Open-
@@ -145,13 +145,12 @@ if (my $bill_resp = $bill_req->recv) {
}
}
-my $xact_start = DateTime: :Format: :ISO8601- >parse_ datetime( cleanse_ ISO8601( $circ-> xact_start) )->epoch; :Format: :ISO8601- >parse_ datetime( cleanse_ ISO8601( $circ-> due_date) )->epoch; :Utils- >interval_ to_seconds( '480 h 0 m 0 s'); :Format: :ISO8601- >parse_ datetime( cleanse_ ISO8601( $circ-> xact_start) ); :Format: :ISO8601- >parse_ datetime( cleanse_ ISO8601( $circ-> due_date) );
-my $due_date = DateTime:
-my $twenty_days = OpenSRF:
+my $xact_start = DateTime:
+my $due_date = DateTime:
# Rewrite history; technically we should rewrite status_changed_item on the copy as well, but, meh... >epoch2ISO8601( $xact_start - $twenty_days) ); >epoch2ISO8601( $due_date - $twenty_days) ); >subtract( days => 20 )->iso8601() ); >subtract( days => 20 )->iso8601() );
-$circ->xact_start( $apputils-
-$circ->due_date( $apputils-
+$circ->xact_start( $xact_start-
+$circ->due_date( $due_date-
$cstore_ ses->connect; # need stateful connection ses->request( 'open-ils. cstore. transaction. begin') ->gather( 1);
my $xact = $cstore_