Skip to content

Cosmos: test enhancements#47501

Open
simorenoh wants to merge 4 commits into
mainfrom
signoff-help
Open

Cosmos: test enhancements#47501
simorenoh wants to merge 4 commits into
mainfrom
signoff-help

Conversation

@simorenoh

@simorenoh simorenoh commented Jun 15, 2026

Copy link
Copy Markdown
Member

Service keeps updating and refining error messages, which means our pipelines will see errors every time they do. So long as status code stays the same, we should be ok with not asserting anything inside the text.

also adds api.md file that is now required by Core

Copilot AI review requested due to automatic review settings June 15, 2026 15:24
@simorenoh simorenoh requested a review from a team as a code owner June 15, 2026 15:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Cosmos full-text policy tests to reduce pipeline flakiness by removing assertions that depend on specific service error message text, keeping only HTTP status code checks.

Changes:

  • Removed several re.search(...) assertions on CosmosHttpResponseError.http_error_message for full-text indexing policy failure cases (sync + async).
  • Kept the tests validating failure via status_code == 400 (and existing pytest.fail(...) guards where present).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
sdk/cosmos/azure-cosmos/tests/test_full_text_policy.py Removes error-message regex assertions for several 400 failure cases in full-text indexing policy tests.
sdk/cosmos/azure-cosmos/tests/test_full_text_policy_async.py Mirrors the sync test changes by removing error-message regex assertions for the async variants.

Comment thread sdk/cosmos/azure-cosmos/tests/test_full_text_policy.py
Comment thread sdk/cosmos/azure-cosmos/tests/test_full_text_policy.py
Comment thread sdk/cosmos/azure-cosmos/tests/test_full_text_policy_async.py
Comment thread sdk/cosmos/azure-cosmos/tests/test_full_text_policy_async.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants