From 7de742bfab84fa45241636bc104c74d497ea8d40 Mon Sep 17 00:00:00 2001 From: Benjamin Russell Date: Wed, 23 Nov 2016 13:34:48 -0800 Subject: [PATCH] Fixing race condition in unit test (#161) --- .../QueryExecution/Execution/ServiceIntegrationTests.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/Execution/ServiceIntegrationTests.cs b/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/Execution/ServiceIntegrationTests.cs index 64bd383d..fa2151c9 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/Execution/ServiceIntegrationTests.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.Test/QueryExecution/Execution/ServiceIntegrationTests.cs @@ -306,8 +306,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.QueryExecution.Execution // Note, we don't care about the results of the first request var firstRequestContext = RequestContextMocks.Create(null); - - queryService.HandleExecuteRequest(queryParams, firstRequestContext.Object).Wait(); + await Common.AwaitExecution(queryService, queryParams, firstRequestContext.Object); // ... And then I request another query after waiting for the first to complete QueryExecuteResult result = null;