Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-129924 / 24.10 / Close persistent client connection at end of run #13981

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/api2/test_zzz_tests_completed.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import faulthandler
import threading

from middlewared.test.integration.utils.client import truenas_server


def test__thread_count(request):
"""Having outstanding threads can prevent python from exiting cleanly."""

# Tear down our persistent connection
truenas_server.client.close()
truenas_server._client = None

count = threading.active_count()
if count > 1:
faulthandler.dump_traceback()
Expand Down
Loading