mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-04 01:25:43 -05:00
Perf Test fixing bugs and Update command (#155)
* Fixed some bugs caused by rafactoring * Verifying a test db is created before running the tests
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.SqlTools.ServiceLayer.TestDriver.Utility;
|
||||
using Xunit.Sdk;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.PerfTests
|
||||
{
|
||||
/// <summary>
|
||||
/// The attribute for each test to create the test db before the test starts
|
||||
/// </summary>
|
||||
public class CreateTestDbAttribute : BeforeAfterTestAttribute
|
||||
{
|
||||
public CreateTestDbAttribute(TestServerType serverType)
|
||||
{
|
||||
ServerType = serverType;
|
||||
}
|
||||
|
||||
public CreateTestDbAttribute(int serverType)
|
||||
{
|
||||
ServerType = (TestServerType)serverType;
|
||||
}
|
||||
|
||||
public TestServerType ServerType { get; set; }
|
||||
public override void Before(MethodInfo methodUnderTest)
|
||||
{
|
||||
Task task = Common.CreateTestDatabase(ServerType);
|
||||
task.Wait();
|
||||
}
|
||||
|
||||
public override void After(MethodInfo methodUnderTest)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user