Barriers: Add tests for 408 substatus code#5853
Conversation
There was a problem hiding this comment.
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.
|
@sdkReviewAgent |
|
Fix PR title for lint |
| $"Expected SubStatusCode 21006 (Server_GlobalStrongWriteBarrierNotMet) " + | ||
| $"but got {ex.SubStatusCode}. Barrier HEAD requests: {barrierRequestCount}"); | ||
| } | ||
| catch (CosmosException ex) when (ex.StatusCode == HttpStatusCode.ServiceUnavailable) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Yes, trying to figure out the different scenarios on which the 2 status codes happen
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
Ignoreannotation once the new release of direct package is done and updated in SDKRelated direct package PR: https://msdata.visualstudio.com/CosmosDB/_git/CosmosDB/pullrequest/2089723
Type of change
Please delete options that are not relevant.
Closing issues
To automatically close an issue: closes #IssueNumber