New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 834725 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
OoO until Feb 4th
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

blinkpy.w3c.test_importer_unittest.TestImporterTest.test_tbr_reviewer_date_not_found fails on local machines

Project Member Reported by tkent@chromium.org, Apr 19 2018

Issue description

Chrome Version: ToT
OS: macOS and Linux

What steps will reproduce the problem?
(1) run third_party/WebKit/Tools/Scripts/test-webkitpy

What is the expected result?
No failures.

What happens instead?
[343/1506] blinkpy.w3c.test_importer_unittest.TestImporterTest.test_tbr_reviewer_date_not_found failed unexpectedly:                     
  No entry found for date 1970-01-01 in rotations table.
  Traceback (most recent call last):
    File "/Users/tkent/chrome/src/third_party/blink/tools/blinkpy/w3c/test_importer_unittest.py", line 351, in test_tbr_reviewer_date_not_found
      'ERROR: No entry found for date 1969-12-31 in rotations table.\n'
    File "/Users/tkent/chrome/src/third_party/WebKit/Tools/Scripts/webkitpy/common/system/log_testing.py", line 237, in assertLog
      self._log.assertMessages(messages)
    File "/Users/tkent/chrome/src/third_party/WebKit/Tools/Scripts/webkitpy/common/system/log_testing.py", line 192, in assertMessages
      self._test_stream.assertMessages(messages)
    File "/Users/tkent/chrome/src/third_party/WebKit/Tools/Scripts/webkitpy/common/system/log_testing.py", line 72, in assertMessages
      self._test_case.assertEqual(messages, self.messages)
  AssertionError: Lists differ: ['ERROR: No entry found for da... != ['ERROR: No entry found for da...
  
  First differing element 0:
  ERROR: No entry found for date 1969-12-31 in rotations table.
  
  ERROR: No entry found for date 1970-01-01 in rotations table.
  
  
  - ['ERROR: No entry found for date 1969-12-31 in rotations table.\n']
  ?                                    ^^  - ^
  
  + ['ERROR: No entry found for date 1970-01-01 in rotations table.\n']
  ?                                    ^^ +  ^
  



Please use labels and text to provide additional information.
Machines' timezone setting is JST, 9 hours ahead from UTC.

 
Cc: -raphael....@intel.com
Owner: raphael....@intel.com
Status: Assigned (was: Untriaged)
I can reproduce it here (CET). The test works fine if I set TZ to something like 'America/Los_Angeles'.
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d57730e226b7e5f1b598c626c84d89f053863d3c

commit d57730e226b7e5f1b598c626c84d89f053863d3c
Author: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Fri Apr 20 16:01:51 2018

WPT importer: Make test_tbr_reviewer_date_not_found() independent of time zones

The test is currently passing when run under a time zone such as
"America/Los_Angeles", but not under CET or JST:

    Traceback (most recent call last):
      File "/data/src/chromium/src/third_party/blink/tools/blinkpy/w3c/test_importer_unittest.py", line 351, in test_tbr_reviewer_date_not_found
        'ERROR: No entry found for date 1969-12-31 in rotations table.\n'
      File "/data/src/chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/common/system/log_testing.py", line 237, in assertLog
        self._log.assertMessages(messages)
      File "/data/src/chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/common/system/log_testing.py", line 192, in assertMessages
        self._test_stream.assertMessages(messages)
      File "/data/src/chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/common/system/log_testing.py", line 72, in assertMessages
        self._test_case.assertEqual(messages, self.messages)
    AssertionError: Lists differ: ['ERROR: No entry found for da... != ['ERROR: No entry found for da...

    First differing element 0:
    'ERROR: No entry found for date 1969-12-31 in rotations table.\n'
    'ERROR: No entry found for date 1970-01-01 in rotations table.\n'

    - ['ERROR: No entry found for date 1969-12-31 in rotations table.\n']
    ?                                    ^^  - ^

    + ['ERROR: No entry found for date 1970-01-01 in rotations table.\n']
    ?                                    ^^ +  ^

Fix it by not hardcoding the expected date, but rather deriving it from
MockHost's time().

While here, also fix a potential bug in test_tbr_reviewer() by not assuming
'2017-01-01' is not the same as today -- we now use variables and timedeltas
to represent the dates in the calendar.

Bug:  834725 
Change-Id: Icd6621350fe9fa2ad1c2c996205d64bc23b01e26
Reviewed-on: https://chromium-review.googlesource.com/1019403
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#552343}
[modify] https://crrev.com/d57730e226b7e5f1b598c626c84d89f053863d3c/third_party/blink/tools/blinkpy/w3c/test_importer_unittest.py

Status: Fixed (was: Started)
Thanks again Raphael :-)

Sign in to add a comment