mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-10-26 21:26:39 +00:00
fix(tests): skip MAX_PATH-exceeding blocking-io anchors on Windows (#6361)
* test(skills): skip MAX_PATH-exceeding anchors on Windows (ref #6353) * test(skills): skip MAX_PATH-exceeding anchors on Windows (ref #6353) * test(skills): skip MAX_PATH-exceeding anchors on Windows (ref #6353) * style(tests): fix import order in project blocking-io tests * fix(tests): narrow Windows MAX_PATH skip to only the two failing attach anchors Per review: module-level skip also skipped ingestion/thread-files anchors that are not MAX_PATH-bound. Now only the two attach staging anchors skip on Windows. --------- Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
parent
d95da069a6
commit
b33e82e392
@ -20,6 +20,7 @@ from __future__ import annotations
|
||||
|
||||
import functools
|
||||
import json
|
||||
import os
|
||||
from types import SimpleNamespace
|
||||
|
||||
import pytest
|
||||
@ -32,7 +33,14 @@ from deerflow.projects.tools import _read_project_document_impl
|
||||
from deerflow.runtime.context_keys import PROJECT_CONTEXT_KEY
|
||||
from deerflow.utils.file_io import run_file_io as _real_run_file_io
|
||||
|
||||
pytestmark = [pytest.mark.asyncio, pytest.mark.allow_blocking_io]
|
||||
pytestmark = [
|
||||
pytest.mark.asyncio,
|
||||
pytest.mark.allow_blocking_io,
|
||||
pytest.mark.skipif(
|
||||
os.name == "nt",
|
||||
reason="project-document anchors exceed Windows MAX_PATH (WinError 206); see #6353",
|
||||
),
|
||||
]
|
||||
|
||||
_USER = "u1"
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ an offload drops the dispatch and turns the anchor red.
|
||||
from __future__ import annotations
|
||||
|
||||
import functools
|
||||
import os
|
||||
from types import SimpleNamespace
|
||||
|
||||
import pytest
|
||||
@ -22,7 +23,10 @@ from deerflow.persistence.projects import ProjectDocumentRepository, ProjectRepo
|
||||
from deerflow.projects.documents import add_staged_document, read_file_chunks, stage_document_bytes, stage_document_copy_for_attach
|
||||
from deerflow.utils.file_io import run_file_io as _real_run_file_io
|
||||
|
||||
pytestmark = [pytest.mark.asyncio, pytest.mark.allow_blocking_io]
|
||||
pytestmark = [
|
||||
pytest.mark.asyncio,
|
||||
pytest.mark.allow_blocking_io,
|
||||
]
|
||||
|
||||
_USER = "u1"
|
||||
|
||||
@ -60,6 +64,10 @@ async def _shelf_document(env) -> dict:
|
||||
return result[0]
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
os.name == "nt",
|
||||
reason="attach staging copy/read exceed Windows MAX_PATH (WinError 206); see #6353",
|
||||
)
|
||||
async def test_attach_staging_copy_dispatches_off_the_loop(tmp_path, monkeypatch) -> None:
|
||||
"""The under-lock source copy (existence/size check + ``shutil.copyfile``)
|
||||
must go through ``run_file_io`` while the row lock is held."""
|
||||
@ -79,6 +87,10 @@ async def test_attach_staging_copy_dispatches_off_the_loop(tmp_path, monkeypatch
|
||||
await close_engine()
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
os.name == "nt",
|
||||
reason="attach staging copy/read exceed Windows MAX_PATH (WinError 206); see #6353",
|
||||
)
|
||||
async def test_attach_staged_read_dispatches_off_the_loop(tmp_path, monkeypatch) -> None:
|
||||
"""``read_file_chunks`` (attach ingestion source + from-thread promote
|
||||
source) must dispatch the open, every chunk read, and the close through
|
||||
|
||||
@ -11,6 +11,7 @@ anchor red (mutation-verified style of this suite).
|
||||
from __future__ import annotations
|
||||
|
||||
import functools
|
||||
import os
|
||||
from types import SimpleNamespace
|
||||
|
||||
import pytest
|
||||
@ -21,7 +22,14 @@ from deerflow.projects.documents import add_staged_document, converted_markdown_
|
||||
from deerflow.projects.trash import make_purge_file_remover, purge_all_trashed, restore_document, run_trash_retention_sweep
|
||||
from deerflow.utils.file_io import run_file_io as _real_run_file_io
|
||||
|
||||
pytestmark = [pytest.mark.asyncio, pytest.mark.allow_blocking_io]
|
||||
pytestmark = [
|
||||
pytest.mark.asyncio,
|
||||
pytest.mark.allow_blocking_io,
|
||||
pytest.mark.skipif(
|
||||
os.name == "nt",
|
||||
reason="project-document anchors exceed Windows MAX_PATH (WinError 206); see #6353",
|
||||
),
|
||||
]
|
||||
|
||||
_USER = "u1"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user