Skip to content

Commit e59fce2

Browse files
committed
fix CI issue
1 parent d61527e commit e59fce2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_start_kernel.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,18 @@ def test_ipython_start_kernel_userns():
5050
assert EXPECTED in text
5151

5252

53-
@pytest.mark.flaky(max_runs=3)
5453
def test_start_kernel_background_thread():
5554
cmd = dedent(
5655
"""
5756
import threading
57+
import asyncio
5858
from ipykernel.kernelapp import launch_new_instance
5959
6060
def launch():
61+
# Threads don't always have a default event loop so we need to
62+
# create and set a default
63+
loop = asyncio.new_event_loop()
64+
asyncio.set_event_loop(loop)
6165
launch_new_instance()
6266
6367
thread = threading.Thread(target=launch)

0 commit comments

Comments
 (0)