Skip to content

Commit

Permalink
Move comments of tests/attributes/test_attributes.py::TestBoundedAttr…
Browse files Browse the repository at this point in the history
…ibute.test_locking to its docstring
  • Loading branch information
hyoinandout committed Apr 25, 2024
1 parent d97e1da commit 6c0a93e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions opentelemetry-api/tests/attributes/test_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,11 @@ def test_immutable(self):
with self.assertRaises(TypeError):
bdict["should-not-work"] = "dict immutable"

# Supporting test case for a commit titled: Fix class BoundedAttributes to have RLock rather than Lock
# The change was introduced because __iter__ of the class BoundedAttributes holds lock, and we observed some deadlock symptoms
# in the codebase. This test case is to verify that the fix works as expected.
def test_locking(self):
"""Supporting test case for a commit titled: Fix class BoundedAttributes to have RLock rather than Lock
The change was introduced because __iter__ of the class BoundedAttributes holds lock, and we observed some deadlock symptoms
in the codebase. This test case is to verify that the fix works as expected.
"""
bdict = BoundedAttributes(immutable=False)
for num in range(100):
bdict[str(num)] = num
Expand Down

0 comments on commit 6c0a93e

Please sign in to comment.