groq[patch]: add retries to integration tests (#30707)

Tool-calling tests started intermittently failing with
> groq.APIError: Failed to call a function. Please adjust your prompt.
See 'failed_generation' for more details.
This commit is contained in:
ccurme 2025-04-07 12:45:53 -04:00 committed by GitHub
parent 4f9f97bd12
commit e106e9602f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 2 deletions

View File

@ -15,7 +15,7 @@ test tests:
uv run --group test pytest --disable-socket --allow-unix-socket $(TEST_FILE)
integration_test integration_tests:
uv run --group test --group test_integration pytest $(TEST_FILE)
uv run --group test --group test_integration pytest --retries 3 --retry-delay 1 $(TEST_FILE)
test_watch:
uv run --group test ptw --snapshot-update --now . -- -vv $(TEST_FILE)

View File

@ -23,6 +23,7 @@ test = [
"pytest-mock<4.0.0,>=3.10.0",
"pytest-watcher<1.0.0,>=0.3.4",
"pytest-asyncio<1.0.0,>=0.21.1",
"pytest-retry<1.8.0,>=1.7.0",
"langchain-core",
"langchain-tests",
]

View File

@ -313,7 +313,7 @@ wheels = [
[[package]]
name = "langchain-core"
version = "0.3.49"
version = "0.3.51"
source = { editable = "../../core" }
dependencies = [
{ name = "jsonpatch" },
@ -394,6 +394,7 @@ test = [
{ name = "pytest" },
{ name = "pytest-asyncio" },
{ name = "pytest-mock" },
{ name = "pytest-retry" },
{ name = "pytest-watcher" },
]
test-integration = [
@ -420,6 +421,7 @@ test = [
{ name = "pytest", specifier = ">=7.3.0,<8.0.0" },
{ name = "pytest-asyncio", specifier = ">=0.21.1,<1.0.0" },
{ name = "pytest-mock", specifier = ">=3.10.0,<4.0.0" },
{ name = "pytest-retry", specifier = ">=1.7.0,<1.8.0" },
{ name = "pytest-watcher", specifier = ">=0.3.4,<1.0.0" },
]
test-integration = [{ name = "langchain-core", editable = "../../core" }]
@ -898,6 +900,18 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/f2/3b/b26f90f74e2986a82df6e7ac7e319b8ea7ccece1caec9f8ab6104dc70603/pytest_mock-3.14.0-py3-none-any.whl", hash = "sha256:0b72c38033392a5f4621342fe11e9219ac11ec9d375f8e2a0c164539e0d70f6f", size = 9863 },
]
[[package]]
name = "pytest-retry"
version = "1.7.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "pytest" },
]
sdist = { url = "https://files.pythonhosted.org/packages/c5/5b/607b017994cca28de3a1ad22a3eee8418e5d428dcd8ec25b26b18e995a73/pytest_retry-1.7.0.tar.gz", hash = "sha256:f8d52339f01e949df47c11ba9ee8d5b362f5824dff580d3870ec9ae0057df80f", size = 19977 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/7c/ff/3266c8a73b9b93c4b14160a7e2b31d1e1088e28ed29f4c2d93ae34093bfd/pytest_retry-1.7.0-py3-none-any.whl", hash = "sha256:a2dac85b79a4e2375943f1429479c65beb6c69553e7dae6b8332be47a60954f4", size = 13775 },
]
[[package]]
name = "pytest-socket"
version = "0.7.0"