[Buildbot-commits] [Buildbot] #2261: Nightly tests fail in timezones which differ by odd multiples of 30 minutes from UTC.

Buildbot nobody at buildbot.net
Wed Mar 28 16:26:14 UTC 2012


#2261: Nightly tests fail in timezones which differ by odd multiples of 30 minutes
from UTC.
--------------------------+--------------------
Reporter:  sa1            |       Owner:
    Type:  defect         |      Status:  new
Priority:  major          |   Milestone:  0.8.7
 Version:  0.8.6p1        |  Resolution:
Keywords:  tests, simple  |
--------------------------+--------------------
Changes (by dustin):

 * keywords:  timezone, tests => tests, simple
 * milestone:  undecided => 0.8.7


Comment:

 The problem here is purely in the tests, so the solution will be
 exclusively in `test_schedulers_timed_Nightly.py`.

 The current code assumes that epoch time 0 is zero minutes past the hour
 (it doesn't matter which hour).  So it assumes that 1500 seconds is 25
 minutes past the hour, when in fact it's 55 minutes past the hour.  The
 '900' is from minute 45.  The 25 and 45 are from `minute` in
 {{{
 #! python
     def do_test_iterations_onlyIfChanged(self, *changes_at):
         fII = mock.Mock(name='fII')
         sched = self.makeScheduler(name='test', builderNames=[ 'test' ],
 branch=None,
                         minute=[5, 25, 45], onlyIfChanged=True,
                         fileIsImportant=fII)
 }}}

 I suspect that the correct solution is to calculate an offset, in seconds,
 to 0 minutes past the hour in local time.  Then advance the clock by that
 offset before starting, and adjust the asserted times by the same offset.

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2261#comment:3>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list