[CalendarServer-changes] [3238] CalendarServer/trunk/twistedcaldav/test/test_memcachelock.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Oct 27 13:03:18 PDT 2008
Revision: 3238
http://trac.macosforge.org/projects/calendarserver/changeset/3238
Author: cdaboo at apple.com
Date: 2008-10-27 13:03:17 -0700 (Mon, 27 Oct 2008)
Log Message:
-----------
Missed one test from last commit.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/test/test_memcachelock.py
Modified: CalendarServer/trunk/twistedcaldav/test/test_memcachelock.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/test_memcachelock.py 2008-10-27 20:00:31 UTC (rev 3237)
+++ CalendarServer/trunk/twistedcaldav/test/test_memcachelock.py 2008-10-27 20:03:17 UTC (rev 3238)
@@ -125,6 +125,22 @@
self.assertTrue(lock._hasLock)
@inlineCallbacks
+ def test_acquire_ok_timeout_0(self):
+ """
+ L{MemCacheProtocol.get} should return a L{Deferred} which is
+ called back with the value and the flag associated with the given key
+ if the server returns a successful result.
+ """
+ lock = MemCacheTestCase.FakedMemcacheLock(self.proto, "lock", "locking", timeout=0)
+ yield self._test(
+ lock.acquire(),
+ "add lock:locking 0 0 1\r\n1\r\n",
+ "STORED\r\n",
+ True
+ )
+ self.assertTrue(lock._hasLock)
+
+ @inlineCallbacks
def test_acquire_fails_timeout_0(self):
"""
L{MemCacheProtocol.get} should return a L{Deferred} which is
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081027/52eaa682/attachment.html>
More information about the calendarserver-changes
mailing list