Skip to content

Barriers: Add tests for 408 substatus code#5853

Open
yash2710 wants to merge 1 commit into
mainfrom
users/trivediyash/barrier408
Open

Barriers: Add tests for 408 substatus code#5853
yash2710 wants to merge 1 commit into
mainfrom
users/trivediyash/barrier408

Conversation

@yash2710
Copy link
Copy Markdown
Contributor

Description

Adds sdk tests for the new SubStatus code introduced in the direct package for Barrier related 408's. Will need the tests to be updated to remove Ignore annotation once the new release of direct package is done and updated in SDK

Related direct package PR: https://msdata.visualstudio.com/CosmosDB/_git/CosmosDB/pullrequest/2089723

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Closing issues

To automatically close an issue: closes #IssueNumber

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Please follow the required format: "[Internal] Category: (Adds|Fixes|Refactors|Removes) Description"

Internal should be used for PRs that have no customer impact. This flag is used to help generate the changelog to know which PRs should be included. Examples:
Diagnostics: Adds GetElapsedClientLatency to CosmosDiagnostics
PartitionKey: Fixes null reference when using default(PartitionKey)
[v4] Client Encryption: Refactors code to external project
[Internal] Query: Adds code generator for CosmosNumbers for easy additions in the future.

@NaluTripician
Copy link
Copy Markdown
Contributor

@sdkReviewAgent

@NaluTripician
Copy link
Copy Markdown
Contributor

Fix PR title for lint

@yash2710 yash2710 changed the title Add tests for 408 substatus code Barriers: Add tests for 408 substatus code May 11, 2026
$"Expected SubStatusCode 21006 (Server_GlobalStrongWriteBarrierNotMet) " +
$"but got {ex.SubStatusCode}. Barrier HEAD requests: {barrierRequestCount}");
}
catch (CosmosException ex) when (ex.StatusCode == HttpStatusCode.ServiceUnavailable)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see this test is also catching 503, but the test says 408. I am curious, should we separate out these two tests so we are clear on our intent of testing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, trying to figure out the different scenarios on which the 2 status codes happen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants