Block ReadConsistencyStrategy in Gateway modes — Direct-only until e2e support added#48122
Block ReadConsistencyStrategy in Gateway modes — Direct-only until e2e support added#48122
Conversation
|
@copilot when you're done, please also run /azp run java - cosmos - tests |
…ception Co-authored-by: jeet1995 <16476407+jeet1995@users.noreply.github.com>
All code changes are complete and pushed (commit |
|
@copilot Ensure unit test coverage across all Cosmos(*)RequestOptions. I do not see request options level coverage. |
|
@copilot Ensure end-to-end test coverage in ReadConsistencyStrategyForGatewayE2ETests. Use "thin-client-multi-region" and "multi-region" TestNG groups for Gateway V2 and Gateway V1 respectively. See FaultInjectionServerErrorRuleOnGatewayV2Tests as an example. |
…ptions types Co-authored-by: jeet1995 <16476407+jeet1995@users.noreply.github.com>
Co-authored-by: jeet1995 <16476407+jeet1995@users.noreply.github.com>
Added
Each type is tested with all 5 strategies (DEFAULT, EVENTUAL, SESSION, LATEST_COMMITTED, GLOBAL_STRONG) plus null reset. |
…ti-region and thin-client-multi-region groups Co-authored-by: jeet1995 <16476407+jeet1995@users.noreply.github.com>
Added
Tests cover all request options types with all 4 non-DEFAULT strategies:
Plus positive tests for DEFAULT and null strategies. |
| .block(); | ||
| } | ||
|
|
||
| private enum GatewayVariant { |
There was a problem hiding this comment.
@copilot - this seems a utility, please move it to TestSuiteBase.
There was a problem hiding this comment.
Moved GatewayVariant to TestSuiteBase as a public enum in commit e53d787.
| @@ -0,0 +1 @@ | |||
| test-output/ | |||
There was a problem hiding this comment.
@copilot - please revert this and don't produce or stage any test-output
There was a problem hiding this comment.
Reverted in b148687. The .gitignore file has been removed from azure-cosmos-tests.
…lity Co-authored-by: jeet1995 <16476407+jeet1995@users.noreply.github.com>
Co-authored-by: jeet1995 <16476407+jeet1995@users.noreply.github.com>
| .gatewayMode() | ||
| .readConsistencyStrategy(strategy) | ||
| .buildAsyncClient(); | ||
| client.close(); |
There was a problem hiding this comment.
@copilot - move client.close() into a finally block.
There was a problem hiding this comment.
Done in 423261a — moved client.close() into finally blocks across all four test methods in the file.
Co-authored-by: jeet1995 <16476407+jeet1995@users.noreply.github.com>
|
@copilot - please fix - RetryContextOnDiagnosticTest.throttlingExceptionGatewayModeScenario � IllegalArgument ReadConsistencyStrategy Eventual is not supported in Gateway mode. ReadConsistencyStrategy is only supported when using DIRECT connection mode. |
…TUAL in Gateway mode test Co-authored-by: jeet1995 <16476407+jeet1995@users.noreply.github.com>
Fixed in |
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.