mirror of
https://github.com/Radarr/Radarr
synced 2024-12-26 09:49:00 +00: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
d92895381c
commit
5a1b82e195
4 changed files with 7 additions and 3 deletions
|
@ -24,6 +24,7 @@ public class StartupContext : IStartupContext
|
|||
public const string TERMINATE = "terminateexisting";
|
||||
public const string RESTART = "restart";
|
||||
public const string REGISTER_URL = "registerurl";
|
||||
public const string NO_SINGLE_INSTANCE_CHECK = "nosingleinstancecheck";
|
||||
|
||||
public StartupContext(params string[] args)
|
||||
{
|
||||
|
|
|
@ -340,8 +340,6 @@ private List<Process> GetProcessesByName(string name)
|
|||
//TODO: move this to an OS specific class
|
||||
var monoProcesses = Process.GetProcessesByName("mono")
|
||||
.Union(Process.GetProcessesByName("mono-sgen"))
|
||||
.Union(Process.GetProcessesByName("mono-sgen32"))
|
||||
.Union(Process.GetProcessesByName("mono-sgen64"))
|
||||
.Where(process =>
|
||||
process.Modules.Cast<ProcessModule>()
|
||||
.Any(module =>
|
||||
|
|
|
@ -88,6 +88,11 @@ private static void SpinToExit(ApplicationModes applicationModes)
|
|||
|
||||
private static void EnsureSingleInstance(bool isService, IStartupContext startupContext)
|
||||
{
|
||||
if (startupContext.Flags.Contains(StartupContext.NO_SINGLE_INSTANCE_CHECK))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var instancePolicy = _container.Resolve<ISingleInstancePolicy>();
|
||||
|
||||
if (startupContext.Flags.Contains(StartupContext.TERMINATE))
|
||||
|
|
|
@ -138,7 +138,7 @@ public void KillAll()
|
|||
private void Start(string outputRadarrConsoleExe)
|
||||
{
|
||||
TestContext.Progress.WriteLine("Starting instance from {0} on port {1}", outputRadarrConsoleExe, Port);
|
||||
var args = "-nobrowser -data=\"" + AppData + "\"";
|
||||
var args = "-nobrowser -nosingleinstancecheck -data=\"" + AppData + "\"";
|
||||
_nzbDroneProcess = _processProvider.Start(outputRadarrConsoleExe, args, null, OnOutputDataReceived, OnOutputDataReceived);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue