mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
Disable single instance check for integration tests
Causes a SIGABRT on mono 6.10 and 6.12 - double free or corruption
This commit is contained in:
parent
e1a9ac7ff2
commit
3a2db4bcf6
4 changed files with 7 additions and 3 deletions
|
@ -24,6 +24,7 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||||
public const string TERMINATE = "terminateexisting";
|
public const string TERMINATE = "terminateexisting";
|
||||||
public const string RESTART = "restart";
|
public const string RESTART = "restart";
|
||||||
public const string REGISTER_URL = "registerurl";
|
public const string REGISTER_URL = "registerurl";
|
||||||
|
public const string NO_SINGLE_INSTANCE_CHECK = "nosingleinstancecheck";
|
||||||
|
|
||||||
public StartupContext(params string[] args)
|
public StartupContext(params string[] args)
|
||||||
{
|
{
|
||||||
|
|
|
@ -340,8 +340,6 @@ namespace NzbDrone.Common.Processes
|
||||||
//TODO: move this to an OS specific class
|
//TODO: move this to an OS specific class
|
||||||
var monoProcesses = Process.GetProcessesByName("mono")
|
var monoProcesses = Process.GetProcessesByName("mono")
|
||||||
.Union(Process.GetProcessesByName("mono-sgen"))
|
.Union(Process.GetProcessesByName("mono-sgen"))
|
||||||
.Union(Process.GetProcessesByName("mono-sgen32"))
|
|
||||||
.Union(Process.GetProcessesByName("mono-sgen64"))
|
|
||||||
.Where(process =>
|
.Where(process =>
|
||||||
process.Modules.Cast<ProcessModule>()
|
process.Modules.Cast<ProcessModule>()
|
||||||
.Any(module =>
|
.Any(module =>
|
||||||
|
|
|
@ -93,6 +93,11 @@ namespace NzbDrone.Host
|
||||||
|
|
||||||
private static void EnsureSingleInstance(bool isService, IStartupContext startupContext)
|
private static void EnsureSingleInstance(bool isService, IStartupContext startupContext)
|
||||||
{
|
{
|
||||||
|
if (startupContext.Flags.Contains(StartupContext.NO_SINGLE_INSTANCE_CHECK))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var instancePolicy = _container.Resolve<ISingleInstancePolicy>();
|
var instancePolicy = _container.Resolve<ISingleInstancePolicy>();
|
||||||
|
|
||||||
if (startupContext.Flags.Contains(StartupContext.TERMINATE))
|
if (startupContext.Flags.Contains(StartupContext.TERMINATE))
|
||||||
|
|
|
@ -145,7 +145,7 @@ namespace NzbDrone.Test.Common
|
||||||
{
|
{
|
||||||
TestContext.Progress.WriteLine("Starting instance from {0} on port {1}", outputNzbdroneConsoleExe, Port);
|
TestContext.Progress.WriteLine("Starting instance from {0} on port {1}", outputNzbdroneConsoleExe, Port);
|
||||||
|
|
||||||
var args = "-nobrowser -data=\"" + AppData + "\"";
|
var args = "-nobrowser -nosingleinstancecheck -data=\"" + AppData + "\"";
|
||||||
_nzbDroneProcess = _processProvider.Start(outputNzbdroneConsoleExe, args, null, OnOutputDataReceived, OnOutputDataReceived);
|
_nzbDroneProcess = _processProvider.Start(outputNzbdroneConsoleExe, args, null, OnOutputDataReceived, OnOutputDataReceived);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue