Skip to content

Commit

Permalink
Fix potential deadlock in checking database account name existence (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
YalinLi0312 authored Sep 18, 2020
1 parent 378846a commit 29d3020
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Azure.Core.TestFramework;
using Azure.ResourceManager.CosmosDB.Models;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

Expand Down Expand Up @@ -55,7 +53,8 @@ public async Task TableCRUDTest()
databaseAccountsCreateOrUpdateParameters.Capabilities.Add(new Capability("EnableTable"));
await WaitForCompletionAsync(
await CosmosDBManagementClient.DatabaseAccounts.StartCreateOrUpdateAsync(resourceGroupName, databaseAccountName, databaseAccountsCreateOrUpdateParameters));
Assert.AreEqual(200, CosmosDBManagementClient.DatabaseAccounts.CheckNameExistsAsync(databaseAccountName).Result.Status);
Response response = await CosmosDBManagementClient.DatabaseAccounts.CheckNameExistsAsync(databaseAccountName);
Assert.AreEqual(200, response.Status);

var tableCreateUpdateParameters1 = new TableCreateUpdateParameters(new TableResource(tableName), new CreateUpdateOptions());
TableGetResults tableGetResults1 = (
Expand Down

0 comments on commit 29d3020

Please sign in to comment.