MCPcopy
hub / github.com/redis/redis-py / test_extend_lock_replace_ttl

Method test_extend_lock_replace_ttl

tests/test_asyncio/test_lock.py:223–229  ·  view source on GitHub ↗
(self, r)

Source from the content-addressed store, hash-verified

221 await lock.release()
222
223 async def test_extend_lock_replace_ttl(self, r):
224 lock = self.get_lock(r, "foo", timeout=10)
225 assert await lock.acquire(blocking=False)
226 assert 8000 < (await r.pttl("foo")) <= 10000
227 assert await lock.extend(10, replace_ttl=True)
228 assert 8000 < (await r.pttl("foo")) <= 10000
229 await lock.release()
230
231 async def test_extend_lock_float(self, r):
232 lock = self.get_lock(r, "foo", timeout=10.5)

Callers

nothing calls this directly

Calls 5

get_lockMethod · 0.95
pttlMethod · 0.80
acquireMethod · 0.45
extendMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected