Skip to content

Commit 970efae

Browse files
authored
gh-89898: Fix test_threading.test_args_argument() (#92885)
Join the thread to not leak threads running in the background to the next test. Fix the following warning on the "AMD64 FreeBSD Shared 3.11" buildbot: test_args_argument (test.test_threading.ThreadTests.test_args_argument) ... Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) Warning -- Dangling thread: <_MainThread(MainThread, started 35026161664)> Warning -- Dangling thread: <Thread(Thread-134 (<lambda>), started 35314998016)> ok
1 parent 1305832 commit 970efae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Lib/test/test_threading.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ def test_args_argument(self):
149149
with self.subTest(target=target, args=args):
150150
t = threading.Thread(target=target, args=args)
151151
t.start()
152+
t.join()
152153

153154
@cpython_only
154155
def test_disallow_instantiation(self):

0 commit comments

Comments
 (0)