Skip to content

Commit

Permalink
Update Cosmos SDK to RTM.
Browse files Browse the repository at this point in the history
Fixes #16728
  • Loading branch information
AndriySvyryd committed Jul 29, 2019
1 parent 8cf395b commit c2a39d7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PropertyGroup Label="Dependencies from nuget.org">
<SystemThreadingTasksExtensionsVersion>4.5.2</SystemThreadingTasksExtensionsVersion>
<CastleCorePackageVersion>4.2.1</CastleCorePackageVersion>
<MicrosoftAzureCosmosPackageVersion>3.0.0.19-preview</MicrosoftAzureCosmosPackageVersion>
<MicrosoftAzureCosmosPackageVersion>3.0.0</MicrosoftAzureCosmosPackageVersion>
<MicrosoftCodeAnalysisCSharpPackageVersion>2.8.0</MicrosoftCodeAnalysisCSharpPackageVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>2.8.0</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
<mod_spatialitePackageVersion>4.3.0.1</mod_spatialitePackageVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public virtual async Task<bool> 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private static async Task<bool> TryConnectAsync()
}
catch (AggregateException aggregate)
{
if (aggregate.Flatten().InnerExceptions.Any(e => IsNotConfigured(e)))
if (aggregate.Flatten().InnerExceptions.Any(IsNotConfigured))
{
return false;
}
Expand Down Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit c2a39d7

Please sign in to comment.