From 6c0a93e11f60faccbc95e5b4a424046f9374a86e Mon Sep 17 00:00:00 2001 From: hyoinandout Date: Thu, 25 Apr 2024 15:19:17 +0900 Subject: [PATCH] Move comments of tests/attributes/test_attributes.py::TestBoundedAttribute.test_locking to its docstring --- opentelemetry-api/tests/attributes/test_attributes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/opentelemetry-api/tests/attributes/test_attributes.py b/opentelemetry-api/tests/attributes/test_attributes.py index 846e17c9b5a..d7f93432dcf 100644 --- a/opentelemetry-api/tests/attributes/test_attributes.py +++ b/opentelemetry-api/tests/attributes/test_attributes.py @@ -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