Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ClientOfficialVersion>3.51.0</ClientOfficialVersion>
<ClientPreviewVersion>3.52.0</ClientPreviewVersion>
<ClientPreviewSuffixVersion>preview.0</ClientPreviewSuffixVersion>
<DirectVersion>3.38.0</DirectVersion>
<DirectVersion>3.39.1</DirectVersion>
<FaultInjectionVersion>1.0.0</FaultInjectionVersion>
<FaultInjectionSuffixVersion>beta.0</FaultInjectionSuffixVersion>
<EncryptionOfficialVersion>2.0.5</EncryptionOfficialVersion>
Expand Down
5 changes: 5 additions & 0 deletions Microsoft.Azure.Cosmos/src/Regions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public static class Regions
/// </summary>
public const string EastUS2 = "East US 2";

/// <summary>
/// Name of the Azure East US 3 region in the Azure Cosmos DB service.
/// </summary>
public const string EastUS3 = "East US 3";

/// <summary>
/// Name of the Azure Central US region in the Azure Cosmos DB service.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1097,10 +1097,11 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabled_ShouldValidat
Assert.AreEqual(0, addressInfo.AllAddresses.Count(x => x.PhysicalUri == newAddress));

// Because force refresh is requested, an unhealthy replica is added to the failed endpoint so that it's status could be validted.
request.RequestContext.FailedEndpoints.Value.Add(
new TransportAddressUri(
request.RequestContext.FailedEndpoints.Value.TryAdd(
key: new TransportAddressUri(
addressUri: new Uri(
uriString: addressTobeMarkedUnhealthy)));
uriString: addressTobeMarkedUnhealthy)),
value: true);

addressInfo = await cache.TryGetAddressesAsync(
request: request,
Expand Down Expand Up @@ -1250,10 +1251,11 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabledAndUnhealthyUr
Assert.AreEqual(0, addressInfo.AllAddresses.Count(x => x.PhysicalUri == newAddress));

// Because force refresh is requested, an unhealthy replica is added to the failed endpoint so that it's health status could be validted.
request.RequestContext.FailedEndpoints.Value.Add(
new TransportAddressUri(
request.RequestContext.FailedEndpoints.Value.TryAdd(
key: new TransportAddressUri(
addressUri: new Uri(
uriString: addressTobeMarkedUnhealthy)));
uriString: addressTobeMarkedUnhealthy)),
value: true);

addressInfo = await cache.TryGetAddressesAsync(
request: request,
Expand Down Expand Up @@ -1554,10 +1556,11 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationDisabled_ShouldNotVal
Assert.AreEqual(0, addressInfo.AllAddresses.Count(x => x.PhysicalUri == newAddress));

// Because force refresh is requested, an unhealthy replica is added to the failed endpoint so that it's status could be validted.
request.RequestContext.FailedEndpoints.Value.Add(
new TransportAddressUri(
request.RequestContext.FailedEndpoints.Value.TryAdd(
key: new TransportAddressUri(
addressUri: new Uri(
uriString: addressTobeMarkedUnhealthy)));
uriString: addressTobeMarkedUnhealthy)),
value: true);

addressInfo = await cache.TryGetAddressesAsync(
request: request,
Expand Down
Loading