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); } } }