memcache wrapper testing

D

David Weldon

I have a wrapper class for memcache-client (adds a little extra
functionality for something specific I need). Does anyone have any good
ideas for how to do unit testing on it?

The issue I have is that the memcache will become full of data from each
functional test I run. It would be nice to have a "clean slate" each
time I run. To me, the obvious thing would be to start and stop a
memcached server for each of my tests, but that seems like a major pain.
Is there something I'm missing like a clear_memcache function or
something?

Thanks!
 
E

Eric Hodel

I have a wrapper class for memcache-client (adds a little extra
functionality for something specific I need). Does anyone have any
good
ideas for how to do unit testing on it?

The issue I have is that the memcache will become full of data from
each
functional test I run. It would be nice to have a "clean slate" each
time I run. To me, the obvious thing would be to start and stop a
memcached server for each of my tests, but that seems like a major
pain.
Is there something I'm missing like a clear_memcache function or
something?

Look at how the memcache-client tests are written. They never touch
a server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top