Remove useless reports, avoid DB-Races
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from app.inbox_locks import InboxRunLocks
|
||||
|
||||
|
||||
def test_inbox_run_locks_serialize_different_inboxes():
|
||||
locks = InboxRunLocks()
|
||||
first = locks.acquire("first", blocking=False)
|
||||
assert first is not None
|
||||
|
||||
try:
|
||||
assert locks.acquire("second", blocking=False) is None
|
||||
finally:
|
||||
first.release()
|
||||
|
||||
second = locks.acquire("second", blocking=False)
|
||||
assert second is not None
|
||||
second.release()
|
||||
Reference in New Issue
Block a user