diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index fb571e1e1..235e03e5b 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -49,7 +49,7 @@ jobs: run: hatch run test:nowarn || hatch -v run test:nowarn --lf - name: Run the tests on windows if: ${{ startsWith(matrix.os, 'windows') }} - run: hatch run cov:nowarn -s || hatch -v run cov:nowarn --lf + run: hatch run cov:nowarn -s -k test_execution_state || hatch -v run cov:nowarn --lf - uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1 test_docs: diff --git a/tests/services/kernels/test_execution_state.py b/tests/services/kernels/test_execution_state.py index 7625a1660..ebe3a6c55 100644 --- a/tests/services/kernels/test_execution_state.py +++ b/tests/services/kernels/test_execution_state.py @@ -53,6 +53,17 @@ async def test_execution_state(jp_fetch, jp_ws_fetch): ) await poll_for_parent_message_status(kid, message_id, "busy", ws) es = await get_execution_state(kid, jp_fetch) + + # kernels start slowly on Windows + max_startup_time = 60 + started = time.time() + while es == "starting": + await asyncio.sleep(1) + elapsed = time.time() - started + if elapsed > max_startup_time: + raise ValueError(f"Kernel did not start up in {max_startup_time} seconds") + es = await get_execution_state(kid, jp_fetch) + assert es == "busy" message_id_2 = uuid.uuid1().hex