OpenConferenceWare is an open source web application for events and conferences. This customizable, general-purpose platform provides proposals, sessions, schedules, tracks and more.
I'm reporting this mostly to record it; the code and tests have been around for years without problems, so I don't know if it's worth dealing with this issue.
Six tests fail intermittently, depending on:
(a) the system TZ environment setting, and
(b) the time of day that you run the tests.
The problem appeared under the following condition on my machine, and may appear under other conditions.
(1) download the OpenSourceBridge theme;
Then between 16:00 and 24:00 PST, do steps (2) and (3). (At those hours, UTC is on a different day than PST.)
(2) Set TZ='UTC'.
(3) Run rake spec
Because I know nothing about about OpenConferenceWate, I don't know whether the test failures are exposing a problem in the specs, or a problem in the models and helpers.
Example of failing tests:
~/openconferenceware $ rake spec
...snip...
1)
'Proposal to_icalendar should export proposals to iCalendar' FAILED
expected: 1245261600,
got: 1245236400 (using ==)
./spec/models/proposal_spec.rb:289:in `assert_calendar_match'
./spec/models/proposal_spec.rb:314:
2)
'Proposal to_icalendar should not raise exceptions if nil duration' FAILED
expected: 1359653437,
got: 1359624637 (using ==)
./spec/models/proposal_spec.rb:289:in `assert_calendar_match'
./spec/models/proposal_spec.rb:337:
3)
'Event#dates should return range between start_date and end_date' FAILED
expected: [Thu, 07 Feb 2013, Fri, 08 Feb 2013, Sat, 09 Feb 2013, Sun, 10 Feb 2013, Mon, 11 Feb 2013, Tue, 12 Feb 2013, Wed, 13 Feb 2013, Thu, 14 Feb 2013],
got: [Wed, 06 Feb 2013, Thu, 07 Feb 2013, Fri, 08 Feb 2013, Sat, 09 Feb 2013, Sun, 10 Feb 2013, Mon, 11 Feb 2013, Tue, 12 Feb 2013, Wed, 13 Feb 2013] (using ==)
./spec/models/event_spec.rb:81:
4)
'Time formatting with objects should format from objects that respond to just start_time' FAILED
expected: "Tuesday, April 1, 2008 at 1:30pm",
got: "Tuesday, April 1, 2008 at 6:30am" (using ==)
./spec/helpers/time_range_helper_spec.rb:48:
5)
'Time formatting with objects should format from objects that respond to both start_time and end_time' FAILED
expected: "Tuesday, April 1, 2008 from 1:30 - 2:15pm",
got: "Tuesday, April 1, 2008 from 6:30 - 7:15am" (using ==)
./spec/helpers/time_range_helper_spec.rb:54:
6)
'ProposalsController schedule should not fail like a whale with iCalendar' FAILED
expected: Wed, 17 Jun 2009 10:00:00 PDT -07:00,
got: Wed Jun 17 10:00:00 +0000 2009 (using ==)
./spec/controllers/proposals_controller_spec.rb:1044:
I believe I've ironed these out. We now always set the time zone to UTC in the test environment and coerce vPim-parsed times back into UTC before comparing them.
I'm reporting this mostly to record it; the code and tests have been around for years without problems, so I don't know if it's worth dealing with this issue.
Six tests fail intermittently, depending on: (a) the system TZ environment setting, and (b) the time of day that you run the tests.
The problem appeared under the following condition on my machine, and may appear under other conditions. (1) download the OpenSourceBridge theme; Then between 16:00 and 24:00 PST, do steps (2) and (3). (At those hours, UTC is on a different day than PST.) (2) Set TZ='UTC'.
(3) Run
rake spec
I saw output like that at the end of this post.
For ideas about the possible cause -- at least for failure 3 below -- see http://danilenko.org/2012/7/6/rails_timezones/
Because I know nothing about about OpenConferenceWate, I don't know whether the test failures are exposing a problem in the specs, or a problem in the models and helpers.
Example of failing tests: ~/openconferenceware $ rake spec ...snip... 1) 'Proposal to_icalendar should export proposals to iCalendar' FAILED expected: 1245261600, got: 1245236400 (using ==) ./spec/models/proposal_spec.rb:289:in `assert_calendar_match' ./spec/models/proposal_spec.rb:314:
2) 'Proposal to_icalendar should not raise exceptions if nil duration' FAILED expected: 1359653437, got: 1359624637 (using ==) ./spec/models/proposal_spec.rb:289:in `assert_calendar_match' ./spec/models/proposal_spec.rb:337:
3) 'Event#dates should return range between start_date and end_date' FAILED expected: [Thu, 07 Feb 2013, Fri, 08 Feb 2013, Sat, 09 Feb 2013, Sun, 10 Feb 2013, Mon, 11 Feb 2013, Tue, 12 Feb 2013, Wed, 13 Feb 2013, Thu, 14 Feb 2013], got: [Wed, 06 Feb 2013, Thu, 07 Feb 2013, Fri, 08 Feb 2013, Sat, 09 Feb 2013, Sun, 10 Feb 2013, Mon, 11 Feb 2013, Tue, 12 Feb 2013, Wed, 13 Feb 2013] (using ==) ./spec/models/event_spec.rb:81:
4) 'Time formatting with objects should format from objects that respond to just start_time' FAILED expected: "Tuesday, April 1, 2008 at 1:30pm", got: "Tuesday, April 1, 2008 at 6:30am" (using ==) ./spec/helpers/time_range_helper_spec.rb:48:
5) 'Time formatting with objects should format from objects that respond to both start_time and end_time' FAILED expected: "Tuesday, April 1, 2008 from 1:30 - 2:15pm", got: "Tuesday, April 1, 2008 from 6:30 - 7:15am" (using ==) ./spec/helpers/time_range_helper_spec.rb:54:
6) 'ProposalsController schedule should not fail like a whale with iCalendar' FAILED expected: Wed, 17 Jun 2009 10:00:00 PDT -07:00, got: Wed Jun 17 10:00:00 +0000 2009 (using ==) ./spec/controllers/proposals_controller_spec.rb:1044:
Finished in 123.63638 seconds
627 examples, 6 failures, 10 pending