mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
added parallel test execution support for ncrunch.
This commit is contained in:
parent
130be58f8c
commit
ff09773a3b
13 changed files with 70 additions and 23 deletions
|
@ -16,7 +16,12 @@ namespace NzbDrone.Core.Test.Framework
|
|||
{
|
||||
internal static class TestDbHelper
|
||||
{
|
||||
private const string DB_TEMPLATE_NAME = "_dbtemplate.sdf";
|
||||
private static readonly string dbTemplateName;
|
||||
|
||||
static TestDbHelper()
|
||||
{
|
||||
dbTemplateName = Path.Combine(Path.GetTempPath(), Path.GetTempFileName()) + ".sdf";
|
||||
}
|
||||
|
||||
internal static string ConnectionString { get; private set; }
|
||||
|
||||
|
@ -30,7 +35,7 @@ namespace NzbDrone.Core.Test.Framework
|
|||
fileName = Guid.NewGuid() + ".sdf";
|
||||
}
|
||||
|
||||
File.Copy(DB_TEMPLATE_NAME, fileName);
|
||||
File.Copy(dbTemplateName, fileName);
|
||||
|
||||
ConnectionString = ConnectionFactory.GetConnectionString(fileName);
|
||||
|
||||
|
@ -46,7 +51,7 @@ namespace NzbDrone.Core.Test.Framework
|
|||
internal static void CreateDataBaseTemplate()
|
||||
{
|
||||
Console.WriteLine("Creating an empty PetaPoco database");
|
||||
var connectionString = ConnectionFactory.GetConnectionString(DB_TEMPLATE_NAME);
|
||||
var connectionString = ConnectionFactory.GetConnectionString(dbTemplateName);
|
||||
var database = ConnectionFactory.GetPetaPocoDb(connectionString);
|
||||
database.Dispose();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue