mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-28 09:35:37 -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:
@@ -172,7 +172,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TestDriver.Tests
|
||||
/// <summary>
|
||||
/// Returns database connection parameters for given server type
|
||||
/// </summary>
|
||||
public async Task<ConnectParams> GetDatabaseConnectionAsync(TestServerType serverType)
|
||||
public async Task<ConnectParams> GetDatabaseConnectionAsync(TestServerType serverType, string databaseName)
|
||||
{
|
||||
ConnectionProfile connectionProfile = null;
|
||||
TestServerIdentity serverIdentiry = ConnectionTestUtils.TestServers.FirstOrDefault(x => x.ServerType == serverType);
|
||||
@@ -195,6 +195,16 @@ namespace Microsoft.SqlTools.ServiceLayer.TestDriver.Tests
|
||||
}
|
||||
ConnectParams conenctParam = ConnectionTestUtils.CreateConnectParams(connectionProfile.ServerName, connectionProfile.Database,
|
||||
connectionProfile.User, password);
|
||||
if (!string.IsNullOrEmpty(databaseName))
|
||||
{
|
||||
conenctParam.Connection.DatabaseName = databaseName;
|
||||
}
|
||||
if (serverType == TestServerType.Azure)
|
||||
{
|
||||
conenctParam.Connection.ConnectTimeout = 30;
|
||||
conenctParam.Connection.Encrypt = true;
|
||||
conenctParam.Connection.TrustServerCertificate = false;
|
||||
}
|
||||
return conenctParam;
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user