Skip to content

Commit a7cc3fe

Browse files
committed
Skip flaky test.
1 parent 5a73ce1 commit a7cc3fe

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lib/test/test_threading.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,6 +1593,28 @@ def task():
15931593
self.assertEqual(os.read(r_interp, 1), FINI)
15941594
self.assertEqual(os.read(r_interp, 1), DONE)
15951595

1596+
@cpython_only
1597+
@unittest.skipIf(True, "only crashes some of the time now that Py_EndInterpreter() can handle more threads")
1598+
def test_daemon_threads_fatal_error(self):
1599+
import_module("_testcapi")
1600+
subinterp_code = f"""if 1:
1601+
import os
1602+
import threading
1603+
import time
1604+
1605+
def f():
1606+
# Make sure the daemon thread is still running when
1607+
# Py_EndInterpreter is called.
1608+
time.sleep({test.support.SHORT_TIMEOUT})
1609+
threading.Thread(target=f, daemon=True).start()
1610+
"""
1611+
script = r"""if 1:
1612+
import _testcapi
1613+
1614+
_testcapi.run_in_subinterp(%r)
1615+
""" % (subinterp_code,)
1616+
assert_python_ok("-c", script)
1617+
15961618
def _check_allowed(self, before_start='', *,
15971619
allowed=True,
15981620
daemon_allowed=True,

0 commit comments

Comments
 (0)