[Internal] Direct Package Upgrade: Refactors Code to Bump Up `Cosmos.Direct` Package to `3.31.2` (#3918)
* Code changes to bump up the direct version. * Code changes to mark the Israel Central region as public. * Code changes to update contracts. * Code changes to fix test failure. Some clean ups. * Code changes to add detailed message for open channels count.
This commit is contained in:
Родитель
8684535d23
Коммит
69702227d9
|
@ -3,7 +3,7 @@
|
|||
<ClientOfficialVersion>3.34.0</ClientOfficialVersion>
|
||||
<ClientPreviewVersion>3.34.0</ClientPreviewVersion>
|
||||
<ClientPreviewSuffixVersion>preview</ClientPreviewSuffixVersion>
|
||||
<DirectVersion>3.31.1</DirectVersion>
|
||||
<DirectVersion>3.31.2</DirectVersion>
|
||||
<EncryptionOfficialVersion>2.0.2</EncryptionOfficialVersion>
|
||||
<EncryptionPreviewVersion>2.0.2</EncryptionPreviewVersion>
|
||||
<EncryptionPreviewSuffixVersion>preview</EncryptionPreviewSuffixVersion>
|
||||
|
|
|
@ -359,5 +359,10 @@ namespace Microsoft.Azure.Cosmos
|
|||
/// Name of the Azure Italy North region in the Azure Cosmos DB service.
|
||||
/// </summary>
|
||||
public const string ItalyNorth = "Italy North";
|
||||
|
||||
/// <summary>
|
||||
/// Name of the Azure Israel Central region in the Azure Cosmos DB service.
|
||||
/// </summary>
|
||||
public const string IsraelCentral = "Israel Central";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@
|
|||
public async Task CreateAndInitializeAsync_WithValidDatabaseAndContainer_ShouldOpenRntbdConnectionsToBackendReplicas()
|
||||
{
|
||||
// Arrange.
|
||||
int httpCallsMade = 0;
|
||||
int httpCallsMade = 0, maxRequestsPerConnection = 6;
|
||||
HttpClientHandlerHelper httpClientHandlerHelper = new ()
|
||||
{
|
||||
RequestCallBack = (request, cancellationToken) =>
|
||||
|
@ -227,6 +227,7 @@
|
|||
{
|
||||
HttpClientFactory = () => new HttpClient(httpClientHandlerHelper),
|
||||
ConnectionMode = ConnectionMode.Direct,
|
||||
MaxRequestsPerTcpConnection = maxRequestsPerConnection,
|
||||
};
|
||||
|
||||
// Act.
|
||||
|
@ -275,8 +276,11 @@
|
|||
.GetValue(loadBalancingPartition);
|
||||
|
||||
Assert.IsNotNull(openChannels);
|
||||
Assert.AreEqual(30, channelCapacity);
|
||||
Assert.AreEqual(1, openChannels.Count);
|
||||
Assert.AreEqual(48, openChannels.Count, "Here the expected value 48 rather explains how many time we call the" +
|
||||
"LoadBalancingPartition.OpenChannelAsync(). The emulator by default returns 12 partitions, and each partition has 4 replicas," +
|
||||
"and by behavior the emulator uses the same URI for eac of these replica, hence 12 * 4 = 48 times we call the OpenChannelAsync()." +
|
||||
"In ideal world, the value should be 1, because for each unique URI, the OpenChannelAsync() call will just be 1.");
|
||||
Assert.AreEqual(openChannels.Count * maxRequestsPerConnection, channelCapacity);
|
||||
|
||||
Documents.Rntbd.LbChannelState channelState = openChannels.First();
|
||||
|
||||
|
|
|
@ -6680,6 +6680,11 @@
|
|||
"Attributes": [],
|
||||
"MethodInfo": "System.String GermanyWestCentral;IsInitOnly:False;IsStatic:True;"
|
||||
},
|
||||
"System.String IsraelCentral": {
|
||||
"Type": "Field",
|
||||
"Attributes": [],
|
||||
"MethodInfo": "System.String IsraelCentral;IsInitOnly:False;IsStatic:True;"
|
||||
},
|
||||
"System.String ItalyNorth": {
|
||||
"Type": "Field",
|
||||
"Attributes": [],
|
||||
|
|
Загрузка…
Ссылка в новой задаче