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:
Leila Lali
2016-11-30 12:56:48 -08:00
committed by GitHub
parent d1b791805a
commit 453ff9de15
19 changed files with 708 additions and 804 deletions

View File

@@ -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;