Skip to content

Commit 55e7316

Browse files
committed
Test Windows related issue
1 parent 3a28d42 commit 55e7316

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/unit/crawlers/_basic/test_basic_crawler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import concurrent
66
import json
77
import logging
8+
import multiprocessing
89
import os
910
import sys
1011
import time
@@ -1678,7 +1679,7 @@ async def test_crawler_statistics_persistence(tmp_path: Path) -> None:
16781679
16791680
This test simulates starting the crawler process twice, and checks that the statistics include first run."""
16801681

1681-
with concurrent.futures.ProcessPoolExecutor() as executor:
1682+
with concurrent.futures.ProcessPoolExecutor(mp_context=multiprocessing.get_context('fork')) as executor:
16821683
# Crawl 2 requests in the first run and automatically persist the state.
16831684
first_run_state = executor.submit(
16841685
_process_run_crawler,

0 commit comments

Comments
 (0)