mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-02 09:35:38 -05:00
If the test name file cannot be found just use the settings.json
This commit is contained in:
@@ -18,9 +18,18 @@ namespace Microsoft.SqlTools.ServiceLayer.TestDriver.Tests
|
||||
{
|
||||
public class PerformanceTests : TestBase
|
||||
{
|
||||
private static string ComplexQuery = File.ReadAllText("./Scripts/AdventureWorks.sql");
|
||||
private static string ComplexQuery = LoadComplexScript();
|
||||
private static string SimpleQuery = "SELECT * FROM sys.all_columns";
|
||||
|
||||
|
||||
private static string LoadComplexScript()
|
||||
{
|
||||
string assemblyLocation = System.Reflection.Assembly.GetEntryAssembly().Location;
|
||||
string folderName = Path.GetDirectoryName(assemblyLocation);
|
||||
string filePath = Path.Combine(folderName, "Scripts/AdventureWorks.sql");
|
||||
return File.ReadAllText(filePath);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task HoverTestOnPrem()
|
||||
{
|
||||
@@ -556,6 +565,8 @@ namespace Microsoft.SqlTools.ServiceLayer.TestDriver.Tests
|
||||
TestTimer timer = new TestTimer();
|
||||
T result = await testToRun();
|
||||
timer.EndAndPrint(testName);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user