From c9db38a52db2bc773ea532f2a3192cd51f4601c2 Mon Sep 17 00:00:00 2001 From: j82w Date: Wed, 6 Oct 2021 12:30:58 -0700 Subject: [PATCH] Direct: Adds version 3.22.0 (#2777) * Adds improved 449 retry logic to be more aggressive on retries * Fixes a bug where a InvalidOperationException can occur if a metadata operation fails while multiple item operations are waiting for the result * Diagnostics: Fix issue causing CPU usage to be NaN intermittently. Related Issue on Github : https://github.com/Azure/azure-cosmos-dotnet-v3/issues/2728 --- Directory.Build.props | 2 +- .../ClientTelemetryTests.cs | 3 +-- .../Microsoft.Azure.Cosmos.Tests/CosmosExceptionTests.cs | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 03350c7308..d4c270ee72 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ 3.21.0 3.21.0 preview - 3.21.1 + 3.22.0 1.0.0-previewV16 1.0.0-preview 1.1.0-preview3 diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs index 9adb1a56e6..7fb35535e6 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs @@ -312,8 +312,7 @@ private async Task WaitAndAssert(int expectedOperationCount, ConsistencyLevel? e actualOperationList.AddRange(telemetryInfo.OperationInfo); actualSystemInformation.AddRange(telemetryInfo.SystemInfo); - // TODO: https://github.com/Azure/azure-cosmos-dotnet-v3/issues/2728 - //Assert.AreEqual(2, telemetryInfo.SystemInfo.Count, $"System Information Count doesn't Match; {JsonConvert.SerializeObject(telemetryInfo.SystemInfo)}"); + Assert.AreEqual(2, telemetryInfo.SystemInfo.Count, $"System Information Count doesn't Match; {JsonConvert.SerializeObject(telemetryInfo.SystemInfo)}"); Assert.IsNotNull(telemetryInfo.GlobalDatabaseAccountName, "GlobalDatabaseAccountName is null"); Assert.IsNotNull(telemetryInfo.DateTimeUtc, "Timestamp is null"); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosExceptionTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosExceptionTests.cs index 7c51ddd3dd..9594766f3b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosExceptionTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosExceptionTests.cs @@ -240,6 +240,7 @@ public void EnsureSuccessStatusCode_ThrowsOnFailure_ContainsComplexJsonBody() } [TestMethod] + [ExpectedException(typeof(ArgumentNullException))] public void VerifyDocumentClientExceptionWithNullHeader() { string errorMessage = "Test Exception!"; @@ -251,9 +252,6 @@ public void VerifyDocumentClientExceptionWithNullHeader() string headerValue = "Test" + Guid.NewGuid(); dce.Headers.Add(headerValue, null); - - ResponseMessage responseMessage = dce.ToCosmosResponseMessage(null); - Assert.IsNull(responseMessage.Headers.Get(headerValue)); } [TestMethod]