Skip to content

Commit e859b8d

Browse files
authored
ci: mark unreliable langchain_community tests (#9490)
This change marks some unreliable tests in the langchain_community suite. Some of these had been recently unmarked in ecc56cf, but it seems like they still have some underlying unreliability ([example](https://app.circleci.com/pipelines/github/DataDog/dd-trace-py/63192/workflows/693a2566-c19c-43c9-9f62-fda445a51e29/jobs/3926490)). ## Checklist - [x] Change(s) are motivated and described in the PR description - [x] Testing strategy is described if automated tests are not included in the PR - [x] Risks are described (performance impact, potential for breakage, maintainability) - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed or label `changelog/no-changelog` is set - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)) - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] If this PR changes the public interface, I've notified `@DataDog/apm-tees`. ## Reviewer Checklist - [x] Title is accurate - [x] All changes are related to the pull request's stated goal - [x] Description motivates each change - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - [x] Testing strategy adequately addresses listed risks - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] Release note makes sense to a user of the library - [x] Author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
1 parent 20e87ca commit e859b8d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/contrib/langchain/test_langchain_community.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ def test_openai_chat_model_sync_generate(langchain, langchain_openai, request_vc
243243
)
244244

245245

246+
@flaky(1735812000)
246247
@pytest.mark.snapshot
247248
def test_openai_chat_model_vision_generate(langchain_openai, request_vcr):
248249
"""
@@ -473,6 +474,7 @@ def test_embedding_logs(langchain_openai, ddtrace_config_langchain, request_vcr,
473474
mock_metrics.count.assert_not_called()
474475

475476

477+
@flaky(1735812000)
476478
@pytest.mark.snapshot
477479
def test_openai_math_chain_sync(langchain, langchain_openai, request_vcr):
478480
"""
@@ -484,6 +486,7 @@ def test_openai_math_chain_sync(langchain, langchain_openai, request_vcr):
484486
chain.invoke("what is two raised to the fifty-fourth power?")
485487

486488

489+
@flaky(1735812000)
487490
@pytest.mark.snapshot(token="tests.contrib.langchain.test_langchain_community.test_chain_invoke")
488491
def test_chain_invoke_dict_input(langchain, langchain_openai, request_vcr):
489492
prompt_template = "what is {base} raised to the fifty-fourth power?"
@@ -580,6 +583,7 @@ def _transform_func(inputs):
580583
sequential_chain.invoke({"text": input_text, "style": "a 90s rapper"})
581584

582585

586+
@flaky(1735812000)
583587
@pytest.mark.snapshot
584588
def test_openai_sequential_chain_with_multiple_llm_sync(langchain, langchain_openai, request_vcr):
585589
template = """Paraphrase this text:
@@ -659,6 +663,7 @@ async def test_openai_sequential_chain_with_multiple_llm_async(langchain, langch
659663
await sequential_chain.ainvoke({"input_text": input_text})
660664

661665

666+
@flaky(1735812000)
662667
@pytest.mark.parametrize(
663668
"ddtrace_config_langchain",
664669
[dict(metrics_enabled=False, logs_enabled=True, log_prompt_completion_sample_rate=1.0)],
@@ -1112,6 +1117,7 @@ def test_lcel_chain_simple(langchain_core, langchain_openai, request_vcr):
11121117
chain.invoke({"input": "how can langsmith help with testing?"})
11131118

11141119

1120+
@flaky(1735812000)
11151121
@pytest.mark.snapshot
11161122
def test_lcel_chain_complicated(langchain_core, langchain_openai, request_vcr):
11171123
prompt = langchain_core.prompts.ChatPromptTemplate.from_template(

0 commit comments

Comments
 (0)