#16686: Race condition in test_view_decorator()
--------------------------------------+-----------------------------------
Reporter: barry@… | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: Testing framework
Version: 1.3 | Severity: Normal
Resolution: | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------+-----------------------------------
Changes (by russellm):
* needs_docs: => 0
* needs_tests: => 0
* needs_better_patch: => 0
Comment:
Is this actually a race condition, or just an issue of being a bit more
acommodating with timings? The test sets up the "other" cache with a 1
second expiry; the test has a 2 second sleep (line 1452) to make sure that
it expires. There is a second sleep at line 1488; the final test you
report is of a view with a 4 second timeout. This might be a bit of a
lineball check -- technically, (2x2seconds + time to run other tests)
should be > 4 seconds, but on a fast box, it might not evaluate like that.
A 3 second sleep at line 1452 should be enough to ensure that the 4 second
cache has expires (2 + 3 second sleep).
So - if I've understood the problem here, it isn't a race condition --
just a case where a fast box exposes the fact that 2+2+time for extra work
may not be enough time to see the cache expire for the last test.
--
Ticket URL: <https://code.djangoproject.com/ticket/16686#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.