Skip to content

Commit 0294e49

Browse files
committed
chore: log active threads that are still running after ending the tests
1 parent cdf917d commit 0294e49

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/integration/container/test_read_write_splitting.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import gc
16+
import threading
1617

1718
import pytest
1819
from sqlalchemy import PoolProxiedConnection
@@ -60,6 +61,11 @@ def setup_method(self, request):
6061
self.logger.info(f"Starting test: {request.node.name}")
6162
yield
6263
self.logger.info(f"Ending test: {request.node.name}")
64+
active_threads = threading.enumerate()
65+
self.logger.info(f"Active threads after test: {len(active_threads)}")
66+
for thread in active_threads:
67+
self.logger.info(f" - {thread.name} (daemon: {thread.daemon})")
68+
6369

6470
@pytest.fixture(scope='class')
6571
def rds_utils(self):

0 commit comments

Comments
 (0)