MCPcopy
hub / github.com/borgbackup/borg / test_break

Method test_break

src/borg/testsuite/fslocking_test.py:255–261  ·  view source on GitHub ↗
(self, lockpath)

Source from the content-addressed store, hash-verified

253 assert not lock.got_exclusive_lock()
254
255 def test_break(self, lockpath):
256 lock = Lock(lockpath, exclusive=True, id=ID1).acquire()
257 lock.break_lock()
258 assert len(lock._roster.get(SHARED)) == 0
259 assert len(lock._roster.get(EXCLUSIVE)) == 0
260 with Lock(lockpath, exclusive=True, id=ID2):
261 pass
262
263 def test_timeout(self, lockpath):
264 with Lock(lockpath, exclusive=False, id=ID1):

Callers

nothing calls this directly

Calls 4

LockClass · 0.50
acquireMethod · 0.45
break_lockMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected