Bug 218079

Summary: Few webkitpy tests fail for machines in non-PST timezones
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=216404
https://bugs.webkit.org/show_bug.cgi?id=225741
https://bugs.webkit.org/show_bug.cgi?id=232197
Attachments:
Description Flags
Patch none

Description Aakash Jain 2020-10-22 07:43:46 PDT
Few webkitpy tests fail for machines in non-PST timezones. They pass when I manually change the timezone to PST in my system preferences. Especially 'Last Changed Date' in the testcases seems to vary by timezone.

======================================================================================================
[1543/1960] webkitscmpy.test.git_unittest.TestGit.test_info failed:                                                                       
  Traceback (most recent call last):
    File "/Volumes/Data/aakash_jain/code5/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py", line 101, in test_info
      }, local.Git(self.path).info(),
  AssertionError: {'Last Changed Date': '2020-10-02 11:56:40', 'Node Kind': 'directory', 'Last Cha [truncated]... != {u'Node Kind': u'directory', u'Schedule': u'normal', u'URL': u'git@webkit.org:/m [truncated]...
  Diff is 908 characters long. Set self.maxDiff to None to see it.
  
[1593/1960] webkitscmpy.test.find_unittest.TestFind.test_standard failed:
  Traceback (most recent call last):
    File "/Volumes/Data/aakash_jain/code5/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/find_unittest.py", line 128, in test_standard
      ''',
  AssertionError: 'Title: 4th commit\nAuthor: Jonathan Bedard <jbedard@apple.com>\nIdentifier: 3@main\nDate: Fri Oct 02 14:23:20 2020\nRevision: 4\nHash: 1abe25b443e9\n' != 'Title: 4th commit\nAuthor: Jonathan Bedard <jbedard@apple.com>\nIdentifier: 3@main\nDate: Fri Oct 02 11:23:20 2020\nRevision: 4\nHash: 1abe25b443e9\n'
  
[1706/1960] webkitscmpy.test.find_unittest.TestFind.test_verbose failed:
  Traceback (most recent call last):
    File "/Volumes/Data/aakash_jain/code5/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/find_unittest.py", line 147, in test_verbose
      ''',
  AssertionError: 'Title: 4th commit\nAuthor: Jonathan Bedard <jbedard@apple.com>\nIdentifier: 3@main\nDate: Fri Oct 02 14:23:20 2020\nRevision: 4\nHash: 1abe25b443e9\n    4th commit\n    svn-id: https://svn.webkit.orgrepository/repository/trunk@4 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n' != 'Title: 4th commit\nAuthor: Jonathan Bedard <jbedard@apple.com>\nIdentifier: 3@main\nDate: Fri Oct 02 11:23:20 2020\nRevision: 4\nHash: 1abe25b443e9\n    4th commit\n    svn-id: https://svn.webkit.orgrepository/repository/trunk@4 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n'
  
[1748/1960] webkitscmpy.test.svn_unittest.TestSvn.test_info failed:
  Traceback (most recent call last):
    File "/Volumes/Data/aakash_jain/code5/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py", line 93, in test_info
      }, local.Svn(self.path).info(),
  AssertionError: {u'NodeKind': u'directory', u'URL': u'https://svn.mock.org/repository/repository [truncated]... != {u'NodeKind': u'directory', u'Last Changed Rev': u'6', u'Schedule': u'normal', u [truncated]...
    {u'Last Changed Author': u'jbedard@apple.com',
  -  u'Last Changed Date': u'2020-10-02 11:58:20 -0100 (Fri, 02 Oct 2020)',
  ?                                      ^
  
  +  u'Last Changed Date': u'2020-10-02 14:58:20 -0100 (Fri, 02 Oct 2020)',
  ?                                      ^
  
     u'Last Changed Rev': u'6',
     u'NodeKind': u'directory',
     u'Path': u'.',
     u'Relative URL': u'^/trunk',
     u'Repository Root': u'https://svn.mock.org/repository/repository',
     u'Revision': u'6',
     u'Schedule': u'normal',
     u'URL': u'https://svn.mock.org/repository/repository/trunk',
     u'Working Copy Root Path': u'/mock/repository'}
  
======================================================================================================
Comment 1 Jonathan Bedard 2020-10-22 08:23:40 PDT
I was hoping to avoid this, but this does make a certain amount of sense....I will have to change my timezone and fix these tests. Shouldn't be particularly difficult.
Comment 2 Radar WebKit Bug Importer 2020-10-22 10:39:32 PDT
<rdar://problem/70579517>
Comment 3 Jonathan Bedard 2020-10-22 10:42:38 PDT
Created attachment 412114 [details]
Patch
Comment 4 EWS 2020-10-22 11:48:01 PDT
Committed r268879: <https://trac.webkit.org/changeset/268879>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 412114 [details].