autopilot tests fail when run in UTC+1 timezone

Bug #1291225 reported by Olivier Tilloy
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu Calendar App
Confirmed
High
Unassigned

Bug Description

All the calendar_app.tests.test_monthview.* tests fail with the following error:

Traceback (most recent call last):
  File "/home/osomon/dev/phablet/calendar-app/tests/autopilot/calendar_app/tests/test_monthview.py", line 73, in test_monthview_go_to_today_next_month
    self._test_go_to_today(1)
  File "/home/osomon/dev/phablet/calendar-app/tests/autopilot/calendar_app/tests/test_monthview.py", line 67, in _test_go_to_today
    self._assert_today()
  File "/home/osomon/dev/phablet/calendar-app/tests/autopilot/calendar_app/tests/test_monthview.py", line 60, in _assert_today
    Eventually(Equals(today.day)))
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 406, in assertThat
    raise mismatch_error
MismatchError: After 10.0 seconds test failed: 12 != 11

This is because in _assert_today(), self.month_view.currentMonth is expressed in UTC, i.e. for today (2014-03-12) its value is [2014-03-11 23:00] when running the tests in the UTC+1 timezone.
currentMonth should be converted to the current timezone before using it.

Related branches

David Planella (dpm)
Changed in ubuntu-calendar-app:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

So if we use the utc datetime, does this solve everything? It should like the property we receive is in UTC, so we can use UTC time to do an assert against it.

Changed in ubuntu-calendar-app:
status: Triaged → In Progress
assignee: nobody → Kunal Parmar (pkunal-parmar)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-calendar-app at revision None, scheduled for release in ubuntu-calendar-app, milestone alpha-1

Changed in ubuntu-calendar-app:
status: In Progress → Fix Committed
Changed in ubuntu-calendar-app:
status: Fix Committed → Fix Released
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

The latest fix seems to have broken things. Things fail for me when run under EDT.

Changed in ubuntu-calendar-app:
status: Fix Released → Confirmed
assignee: Kunal Parmar (pkunal-parmar) → nobody
Revision history for this message
Charles Kerr (charlesk) wrote :

I'm experiencing this too.

Running calendar-app 0.4.462 in the America/Chicago region. I created a new repeating daily event to go at 10:30pm, starting tonight (Tue, Sept 23).

calendar-app shows the alarms in the correct spot on the calendar (10:15 PM), but indicator-datetime shows the alarm as being scheduled for 3:15 AM tomorrow, and indeed the VEVENT records it as a floating event starting at 3:15 AM:

BEGIN:VEVENT
UID:20140924T024128Z-6577-32011-1295-41@ubuntu-phablet
DTSTAMP:20140924T024128Z
DTSTART:20140924T031500
DTEND:20140924T041500
RRULE:FREQ=DAILY
SUMMARY:Some Summary
DESCRIPTION:Some Description
CREATED:20140924T024128Z
LAST-MODIFIED:20140924T024128Z
BEGIN:VALARM
X-EVOLUTION-ALARM-UID:20140924T024128Z-6577-32011-1295-42@ubuntu-phablet
ACTION:AUDIO
TRIGGER;VALUE=DURATION;RELATED=START:-PT30M
REPEAT:3
DURATION:PT2M
END:VALARM
BEGIN:VALARM
X-EVOLUTION-ALARM-UID:20140924T024128Z-6577-32011-1295-43@ubuntu-phablet
ACTION:DISPLAY
DESCRIPTION:Bibbly
TRIGGER;VALUE=DURATION;RELATED=START:-PT30M
REPEAT:3
DURATION:PT2M
END:VALARM
END:VEVENT

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.