Closed Bug 454938 Opened 16 years ago Closed 15 years ago

Memcaching unit tests should not use real memcached

Categories

(addons.mozilla.org Graveyard :: Administration, defect, P3)

Tracking

(Not tracked)

RESOLVED FIXED
4.x (triaged)

People

(Reporter: wenzel, Assigned: wenzel)

References

Details

The current tests for the basic memcaching model all rely on an actual memcache server in the background. We don't need that, and it may corrupt data if pointed at a real-world server -- using a mock object would be better.
Depends on: 457601
I need to push this out of the current milestone due to its big dependency tree :(
No longer depends on: 457601
Target Milestone: 4.0.2 → 4.x (triaged)
Depends on: 457601
As long as we're namespacing the test data why is it a problem?
Maybe because you need an actual memcache server to run the tests, but that's okay. Also, I seem to remember the memcache tests flush the cached data at times, which should really not be done on a production server.
Requiring memcache is fine, but flushing production isn't good. I was just concerned using a mock object might be different enough that it won't make for effective tests. I don't think we want to require a test memcache server either though.
We should revisit how this is setup with amo:v4
Priority: -- → P3
(In reply to comment #5) > We should revisit how this is setup with amo:v4 django.core.cache can write to multiple backends, including memcached, files, and a dummy cache. But the examples of "advanced" websites that I've seen have been using the underlying memcached API, so we'll probably just end up mocking it. Good news: that's really easy!
Zamboni handles tests involving caching very well now.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.