This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: FAIL: test_last_modified (test.test_httpservers.SimpleHTTPServerTestCase), on AMD64 Windows8.1 Non-Debug 3.x
Type: Stage: resolved
Components: Tests Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: vstinner
Priority: normal Keywords:

Created on 2017-07-28 13:14 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 2933 merged vstinner, 2017-07-28 15:57
Messages (3)
msg299385 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-28 13:14
http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/985/steps/test/logs/stdio

======================================================================
FAIL: test_last_modified (test.test_httpservers.SimpleHTTPServerTestCase)
Checks that the datetime returned in Last-Modified response header
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release\build\lib\test\test_httpservers.py", line 512, in test_last_modified
    self.assertEqual(last_modif_header, self.last_modif_header)
AssertionError: 'Fri, 28 Jul 2017 01:20:09 GMT' != 'Fri, 28 Jul 2017 01:20:06 GMT'
- Fri, 28 Jul 2017 01:20:09 GMT
?                         ^
+ Fri, 28 Jul 2017 01:20:06 GMT
?                         ^
msg299400 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-28 16:00
I can reproduce the failure if I insert time.sleep(1) after os.fstat().

Attached PR should fix the race condition.
msg299404 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-28 16:15
New changeset 28ce07ae9e34c70eea6b52515c7e00001cefd41e by Victor Stinner in branch 'master':
bpo-31066: Fix test_httpservers.test_last_modified() (#2933)
https://github.com/python/cpython/commit/28ce07ae9e34c70eea6b52515c7e00001cefd41e
History
Date User Action Args
2022-04-11 14:58:49adminsetgithub: 75249
2017-07-28 16:19:12vstinnersetstatus: open -> closed
resolution: fixed
stage: resolved
2017-07-28 16:15:04vstinnersetmessages: + msg299404
2017-07-28 16:00:16vstinnersetmessages: + msg299400
2017-07-28 15:57:39vstinnersetpull_requests: + pull_request2985
2017-07-28 13:14:47vstinnercreate