Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #22: Solved slow SQL Server tests #157

Merged
merged 1 commit into from
Dec 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions grate.unittests/TestInfrastructure/SqlServerGrateTestContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ class SqlServerGrateTestContext : TestContextBase, IGrateTestContext, IDockerTes
public int? Port { get; set; }

public string DockerCommand(string serverName, string adminPassword) =>
$"run -d --name {serverName} -e ACCEPT_EULA=Y -e SA_PASSWORD={adminPassword} -e MSSQL_PID=Developer -e MSSQL_COLLATION=Danish_Norwegian_CI_AS -P mcr.microsoft.com/mssql/server:2017-latest";
$"run -d --name {serverName} -e ACCEPT_EULA=Y -e SA_PASSWORD={adminPassword} -e MSSQL_PID=Developer -e MSSQL_COLLATION=Danish_Norwegian_CI_AS -P mcr.microsoft.com/mssql/server:latest";

public string AdminConnectionString => $"Data Source=localhost,{Port};Initial Catalog=master;User Id=sa;Password={AdminPassword};Encrypt=false";
public string ConnectionString(string database) => $"Data Source=localhost,{Port};Initial Catalog={database};User Id=sa;Password={AdminPassword};Encrypt=false";
public string AdminConnectionString => $"Data Source=localhost,{Port};Initial Catalog=master;User Id=sa;Password={AdminPassword};Encrypt=false;Pooling=false";
public string ConnectionString(string database) => $"Data Source=localhost,{Port};Initial Catalog={database};User Id=sa;Password={AdminPassword};Encrypt=false;Pooling=false";

public DbConnection GetDbConnection(string connectionString) => new SqlConnection(connectionString);

Expand All @@ -36,6 +36,6 @@ public string DockerCommand(string serverName, string adminPassword) =>
SelectVersion = "SELECT @@VERSION",
};

public string ExpectedVersionPrefix => "Microsoft SQL Server 2017";
public string ExpectedVersionPrefix => "Microsoft SQL Server 2019";
public bool SupportsCreateDatabase => true;
}
}