mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-22 16:36:47 +08:00
Fix: failing p3 test for SDK/HTTP APIs (#13062)
### What problem does this PR solve? Adjust highlight parsing, add row-count SQL override, tweak retrieval thresholding, and update tests with engine-aware skips/utilities. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -272,7 +272,7 @@ class TestChunksRetrieval:
|
||||
[
|
||||
({"highlight": True}, 0, True, ""),
|
||||
({"highlight": "True"}, 0, True, ""),
|
||||
pytest.param({"highlight": False}, 0, False, "", marks=pytest.mark.skip(reason="issues/6648")),
|
||||
({"highlight": False}, 0, False, ""),
|
||||
({"highlight": "False"}, 0, False, ""),
|
||||
pytest.param({"highlight": None}, 0, False, "", marks=pytest.mark.skip(reason="issues/6648")),
|
||||
],
|
||||
@@ -282,8 +282,7 @@ class TestChunksRetrieval:
|
||||
payload.update({"question": "chunk", "dataset_ids": [dataset_id]})
|
||||
res = retrieval_chunks(HttpApiAuth, payload)
|
||||
assert res["code"] == expected_code
|
||||
doc_engine = os.environ.get("DOC_ENGINE", "elasticsearch").lower()
|
||||
if expected_highlight and doc_engine != "infinity":
|
||||
if expected_highlight:
|
||||
for chunk in res["data"]["chunks"]:
|
||||
assert "highlight" in chunk
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user