Skip to content

Commit 1be5b9d

Browse files
committed
Drop DomainUsage options
1 parent 1c2a36a commit 1be5b9d

24 files changed

Lines changed: 184 additions & 906 deletions

src/NUnitConsole/nunit3-console.tests/BadFileTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ public void MissingFileTest(string filename, string message)
2424
services.Add(new DriverService());
2525
#if NET35
2626
services.Add(new RuntimeFrameworkService());
27+
services.Add(new DomainManager());
2728
#endif
2829

2930
var package = new TestPackage(fullname);
3031
package.AddSetting("ProcessModel", "InProcess");
31-
package.AddSetting("DomainUsage", "None");
3232

3333
var runner = new MasterTestRunner(services, package);
3434

src/NUnitConsole/nunit3-console.tests/CommandLineTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ public void CanRecognizeBooleanOptions(string propertyName, string pattern)
197197
[TestCase("ConsoleEncoding", "encoding", new string[] { "utf-8", "ascii", "unicode" }, new string[0])]
198198
#if NET35
199199
[TestCase("ProcessModel", "process", new string[] { "InProcess", "Separate", "Multiple" }, new string[] { "JUNK" })]
200-
[TestCase("DomainUsage", "domain", new string[] { "None", "Single", "Multiple" }, new string[] { "JUNK" })]
201200
[TestCase("Framework", "framework", new string[] { "net-4.0" }, new string[0])]
202201
[TestCase("ConfigurationFile", "configfile", new string[] { "mytest.config" }, new string[0] )]
203202
[TestCase("PrincipalPolicy", "set-principal-policy", new string[] { "UnauthenticatedPrincipal", "NoPrincipal", "WindowsPrincipal" }, new string[] { "JUNK" })]
@@ -240,7 +239,6 @@ public void CanRecognizeInProcessOption()
240239

241240
#if NET35
242241
[TestCase("ProcessModel", "process", new string[] { "InProcess", "Separate", "Multiple" })]
243-
[TestCase("DomainUsage", "domain", new string[] { "None", "Single", "Multiple" })]
244242
#endif
245243
[TestCase("DisplayTestLabels", "labels", new string[] { "Off", "OnOutputOnly", "Before", "After", "BeforeAndAfter" })]
246244
[TestCase("InternalTraceLevel", "trace", new string[] { "Off", "Error", "Warning", "Info", "Debug", "Verbose" })]
@@ -290,7 +288,6 @@ public void CanRecognizeIntOptions(string propertyName, string pattern)
290288
[TestCase("--encoding")]
291289
#if NET35
292290
[TestCase("--process")]
293-
[TestCase("--domain")]
294291
[TestCase("--framework")]
295292
#endif
296293
public void MissingValuesAreReported(string option)

src/NUnitConsole/nunit3-console.tests/MakeTestPackageTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ public void MultipleAssemblies()
4848
[TestCase("--process=Single", "ProcessModel", "InProcess")]
4949
[TestCase("--process=InProcess", "ProcessModel", "InProcess")]
5050
[TestCase("--inprocess", "ProcessModel", "InProcess")]
51-
[TestCase("--domain=Multiple", "DomainUsage", "Multiple")]
52-
[TestCase("--domain=multiple", "DomainUsage", "Multiple")]
5351
[TestCase("--framework=net-4.0", "RequestedRuntimeFramework", "net-4.0")]
5452
[TestCase("--configfile=mytest.config", "ConfigurationFile", "mytest.config")]
5553
[TestCase("--agents=5", "MaxAgents", 5)]

src/NUnitConsole/nunit3-console.tests/NetCoreConsoleOptionsTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ private static IEnumerable<TestCaseData> TestCases
6565
"-configfile=app.config",
6666
"-process=Single",
6767
"-inprocess",
68-
"-domain=Single",
6968
"-framework=net-3.5",
7069
"-x86",
7170
"-shadowcopy",

src/NUnitConsole/nunit3-console/ConsoleOptions.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,6 @@ public IList<OutputSpecification> ResultOutputSpecifications
124124
public string ProcessModel { get; private set; }
125125
public bool ProcessModelSpecified { get { return ProcessModel != null; } }
126126

127-
public string DomainUsage { get; private set; }
128-
public bool DomainUsageSpecified { get { return DomainUsage != null; } }
129-
130127
// How to Run Tests
131128

132129
public string Framework { get; private set; }
@@ -348,9 +345,6 @@ private void ConfigureOptions()
348345
this.AddNetFxOnlyOption("inprocess", "Synonym for --process:InProcess",
349346
NetFxOnlyOption("inprocess", v => ProcessModel = "InProcess"));
350347

351-
this.AddNetFxOnlyOption("domain=", "{DOMAIN} isolation for test assemblies.\nValues: None, Single, Multiple. If not specified, defaults to Single for a single assembly or Multiple for more than one.",
352-
NetFxOnlyOption("domain=", v => DomainUsage = parser.RequiredValue(v, "--domain", "None", "Single", "Multiple")));
353-
354348
// How to Run Tests
355349
this.AddNetFxOnlyOption("framework=", "{FRAMEWORK} type/version to use for tests.\nExamples: mono, net-3.5, v4.0, 2.0, mono-4.0. If not specified, tests will run under the framework they are compiled with.",
356350
NetFxOnlyOption("framework=", v => Framework = parser.RequiredValue(v, "--framework")));

src/NUnitConsole/nunit3-console/ConsoleRunner.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,6 @@ public static TestPackage MakeTestPackage(ConsoleOptions options)
371371
if (options.ProcessModelSpecified)
372372
package.AddSetting(EnginePackageSettings.ProcessModel, options.ProcessModel);
373373

374-
if (options.DomainUsageSpecified)
375-
package.AddSetting(EnginePackageSettings.DomainUsage, options.DomainUsage);
376-
377374
if (options.FrameworkSpecified)
378375
package.AddSetting(EnginePackageSettings.RequestedRuntimeFramework, options.Framework);
379376

src/NUnitConsole/nunit3-console/EnginePackageSettings.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@ public static class EnginePackageSettings
4949
/// </summary>
5050
public const string DebugAgent = "DebugAgent";
5151

52-
/// <summary>
53-
/// Indicates how to load tests across application domains. Values are:
54-
/// "Default", "None", "Single", "Multiple". Default is "Multiple"
55-
/// if more than one assembly is loaded in a process. Otherwise,
56-
/// it is "Single".
57-
/// </summary>
58-
public const string DomainUsage = "DomainUsage";
59-
6052
/// <summary>
6153
/// The private binpath used to locate assemblies. Directory paths
6254
/// is separated by a semicolon. It's an error to specify this and

src/NUnitEngine/nunit.engine.core/EnginePackageSettings.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,6 @@ public static class EnginePackageSettings
5454
/// </summary>
5555
public const string DebugAgent = "DebugAgent";
5656

57-
/// <summary>
58-
/// Indicates how to load tests across application domains. Values are:
59-
/// "Default", "None", "Single", "Multiple". Default is "Multiple"
60-
/// if more than one assembly is loaded in a process. Otherwise,
61-
/// it is "Single".
62-
/// </summary>
63-
public const string DomainUsage = "DomainUsage";
64-
6557
/// <summary>
6658
/// The private binpath used to locate assemblies. Directory paths
6759
/// is separated by a semicolon. It's an error to specify this and

src/NUnitEngine/nunit.engine.core/Internal/DomainUsage.cs

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/NUnitEngine/nunit.engine.core/Services/InProcessTestRunnerFactory.cs

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt
2+
23
using NUnit.Engine.Internal;
34
using NUnit.Engine.Runners;
45

@@ -24,26 +25,13 @@ public virtual ITestEngineRunner MakeTestRunner(TestPackage package)
2425
#if !NETFRAMEWORK
2526
return new LocalTestRunner(ServiceContext, package);
2627
#else
27-
DomainUsage domainUsage = (DomainUsage)System.Enum.Parse(
28-
typeof(DomainUsage),
29-
package.GetSetting(EnginePackageSettings.DomainUsage, "Default"));
30-
31-
switch (domainUsage)
32-
{
33-
default:
34-
case DomainUsage.Default:
35-
case DomainUsage.Multiple:
36-
if (package.SubPackages.Count > 1)
37-
return new MultipleTestDomainRunner(this.ServiceContext, package);
38-
else
39-
return new TestDomainRunner(this.ServiceContext, package);
40-
41-
case DomainUsage.None:
42-
return new LocalTestRunner(ServiceContext, package);
43-
44-
case DomainUsage.Single:
45-
return new TestDomainRunner(ServiceContext, package);
46-
}
28+
// TODO: Fix handling of unknown extensions and missing files
29+
// so we can use...
30+
// if (package.Select(p => p.IsAssemblyPackage()).Count > 1)
31+
if (package.SubPackages.Count > 1)
32+
return new MultipleTestDomainRunner(ServiceContext, package);
33+
else
34+
return new TestDomainRunner(ServiceContext, package);
4735
#endif
4836
}
4937

0 commit comments

Comments
 (0)