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:
6ba3i
2026-02-09 14:56:10 +08:00
committed by GitHub
parent ba95167e13
commit fabbfcab90
10 changed files with 110 additions and 12 deletions

View File

@@ -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: