You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
your suggested change for MemcacheStore still assumes that the lock store is the only consumer of the whole Memcache instance (so that clearing the memcache instance does not remove other things than locks).
And if this is only something useful for tests (which I think is the case as clearing the lock store basically breaks the behavior of the lock), I think it might be better for your test to reach directly to the lower-level layer (or to avoid using a persistent lock storage depending on the kind of tests)
Description
Maybe I missed some things but I didn't find an easy way to reset a LockStore.
If I run
and I run my tests two times, I get
true
first time andfalse
second time.I would look for an easy way to "clear" locks between tests runs.
Of course the issue doesn't occur with
$this->lockFactory->createLock('foo', 60, true);
since the lock is autoreleased.In the same way there is
What about something like a
ClearableStoreInterface
?There is also a need for a way to access store in tests...
Example
For instance, MemcachStore would implement
The text was updated successfully, but these errors were encountered: