#32831: Some cache tests are flaky (e.g. 
cache.tests.BaseMemcachedTests.test_touch)
--------------------------------------+------------------------------------
     Reporter:  Chris Jerdonek        |                    Owner:  (none)
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Core (Cache system)   |                  Version:  dev
     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 Simon Charette):

 I get a sense that a lot of these failures are due to tests using their
 same global store at the same time as Chris pointed out. A clear sign of
 that is `cache.clear` is being called at `setUp` time.

 A solution here could be to run these tests cases in they own separate key
 space (e.g. with a cache key prefix or with two distinct memcached
 instances) or to serialize them to ensure that no tests share the same
 resource (e.g. using a `multiprocessing.lock` acquired in `setUp` and
 released in `tearDown`).

 There might be more too it though as I'm unsure what the djangci setup
 looks like. Is there one memcached / Redis instance per job or are they
 shared amongst them?
-- 
Ticket URL: <https://code.djangoproject.com/ticket/32831#comment:15>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018ed8b2a1ac-357710da-898f-47af-bf80-a84c9e7b21f6-000000%40eu-central-1.amazonses.com.

Reply via email to