From c2a39d700963f71c0035fa297aae6ec430578951 Mon Sep 17 00:00:00 2001 From: AndriySvyryd Date: Mon, 29 Jul 2019 10:27:29 -0700 Subject: [PATCH] Update Cosmos SDK to RTM. Fixes #16728 --- eng/Versions.props | 2 +- src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs | 2 +- .../TestUtilities/CosmosDbConfiguredConditionAttribute.cs | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 5d13a892289..00b01b9cd3c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -12,7 +12,7 @@ 4.5.2 4.2.1 - 3.0.0.19-preview + 3.0.0 2.8.0 2.8.0 4.3.0.1 diff --git a/src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs b/src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs index 8e751512936..1d79474c392 100644 --- a/src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs +++ b/src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs @@ -180,7 +180,7 @@ public virtual async Task DeleteDatabaseOnceAsync( object __, CancellationToken cancellationToken = default) { - var response = await Client.GetDatabase(_databaseId).DeleteAsync(cancellationToken: cancellationToken) + var response = await Client.GetDatabase(_databaseId).DeleteStreamAsync(cancellationToken: cancellationToken) .ConfigureAwait(false); return response.StatusCode == HttpStatusCode.NoContent; diff --git a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosDbConfiguredConditionAttribute.cs b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosDbConfiguredConditionAttribute.cs index 80993ed4321..b97e4d8beeb 100644 --- a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosDbConfiguredConditionAttribute.cs +++ b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosDbConfiguredConditionAttribute.cs @@ -37,7 +37,7 @@ private static async Task TryConnectAsync() } catch (AggregateException aggregate) { - if (aggregate.Flatten().InnerExceptions.Any(e => IsNotConfigured(e))) + if (aggregate.Flatten().InnerExceptions.Any(IsNotConfigured)) { return false; } @@ -68,10 +68,8 @@ private static bool IsNotConfigured(Exception firstException) { case HttpRequestException re: return true; - case Exception e: - return e.Message.StartsWith("The input authorization token can't serve the request. Please check that the expected payload is built as per the protocol, and check the key being used."); default: - return false; + return firstException.Message.StartsWith("The input authorization token can't serve the request. Please check that the expected payload is built as per the protocol, and check the key being used.", StringComparison.Ordinal); } } }