[Django] #25558: Non-deterministic test failure on Windows: test_clearsessions_command

11 views
Skip to first unread message

Django

unread,
Oct 15, 2015, 2:38:32 PM10/15/15
to django-...@googlegroups.com
#25558: Non-deterministic test failure on Windows: test_clearsessions_command
--------------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: Bug | Status: new
Component: contrib.sessions | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------------+------------------------
Since c055224763e11b29cce0a7c10751354c40dac63e, the following test failure
occurs sometimes on Windows.

{{{
FAIL: test_clearsessions_command (sessions_tests.tests.FileSessionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\projects\django\django\test\utils.py", line 181, in inner
return test_func(*args, **kwargs)
File "C:\projects\django\tests\sessions_tests\tests.py", line 563, in
test_clearsessions_command
self.assertEqual(1, count_sessions())
AssertionError: 1 != 2
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25558>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 15, 2015, 2:47:41 PM10/15/15
to django-...@googlegroups.com
#25558: Non-deterministic test failure on Windows: test_clearsessions_command
----------------------------------+------------------------------------
Reporter: timgraham | Owner: bgianfo
Type: Bug | Status: assigned
Component: contrib.sessions | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by bgianfo):

* status: new => assigned
* owner: nobody => bgianfo


--
Ticket URL: <https://code.djangoproject.com/ticket/25558#comment:1>

Django

unread,
Oct 15, 2015, 6:56:25 PM10/15/15
to django-...@googlegroups.com
#25558: Non-deterministic test failure on Windows: test_clearsessions_command
----------------------------------+------------------------------------
Reporter: timgraham | Owner: bgianfo
Type: Bug | Status: assigned
Component: contrib.sessions | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------

Comment (by bgianfo):

Sent pull request here: https://github.com/django/django/pull/5434

Looks to be a timing related issue with the file backend, where we weren't
handling the case where the expiry age is zero, which arguably is also
expired.

--
Ticket URL: <https://code.djangoproject.com/ticket/25558#comment:2>

Django

unread,
Oct 17, 2015, 10:03:58 AM10/17/15
to django-...@googlegroups.com
#25558: Non-deterministic test failure on Windows: test_clearsessions_command
----------------------------------+------------------------------------
Reporter: timgraham | Owner: bgianfo
Type: Bug | Status: closed
Component: contrib.sessions | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"a3fffdca2472885a99e1ea9159a685753cd45738" a3fffdc]:
{{{
#!CommitTicketReference repository=""
revision="a3fffdca2472885a99e1ea9159a685753cd45738"
Fixed #25558 -- Fixed nondeterministic test failure on Windows:
test_clearsessions_command.

The test session without an expiration date added in refs #22938 wasn't
always deleted on Windows because get_expiry_age() returns zero and the
file backend didn't consider that an expired session.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25558#comment:3>

Reply all
Reply to author
Forward
0 new messages