MCPcopy Create free account
hub / github.com/FastLED/FastLED / test_break_stale_lock

Method test_break_stale_lock

ci/tests/test_lock_database.py:242–249  ·  view source on GitHub ↗

Stale lock successfully broken.

(self)

Source from the content-addressed store, hash-verified

240 self.assertTrue(self.db.is_lock_stale("stale_lock"))
241
242 def test_break_stale_lock(self) -> None:
243 """Stale lock successfully broken."""
244 dead_pid = 999999
245 self.db.try_acquire("stale_lock", dead_pid, "localhost", "dead_op")
246
247 broken = self.db.break_stale_lock("stale_lock")
248 self.assertTrue(broken)
249 self.assertFalse(self.db.is_held("stale_lock"))
250
251 def test_break_active_lock_fails(self) -> None:
252 """Active lock (current PID) cannot be broken via break_stale_lock."""

Callers

nothing calls this directly

Calls 3

break_stale_lockMethod · 0.80
is_heldMethod · 0.80
try_acquireMethod · 0.45

Tested by

no test coverage detected