Separate appDomains when running tests from nunit console
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUnit V2 |
Fix Released
|
High
|
Charlie Poole | ||
Bug Description
running my tests in v-2.5.2 (by nunit console), I encountered a problem of appDomains unwanted separation. my test dll is running under a dedicated appDomain, whereas the nunit console exe is running under the default appDomain. this separation caused some of my tests to fail. in v-2.4.8, by writting in the command line: "Domain=None", i avoided this separation, so all tests and executables ran under one appDomain, which is the default one.
looking into the source code of v-2.5.2 and v-2.4.8, i noticed that the case of DomainUsage.None case was forgotten in the TestRunnerFactory class.
in v-2.4.8, a RemoteTestRunner was created in this case. in v-2.5.2, no specific handling was done, so a TestDomain was created, which creates a dedicated appDomain.
the relevant source code, with my change, is (in TestRunnerFacto
switch (processModel)
{
}
i submitted a post on this issue and got from Charlie the following answer:
"Hi Shai,
This is based only on code review - I have not yet written
a test - but it looks like this feature may have been dropped
unintentionally during the 2.5 beta period.
In the past, nunit-console.exe and nunit.exe had separate
code to determine what sort of test runner to create. When
the console runner was converted to use the same factory
that is used by the gui, the DomainUsage.None capability
should have been added to the factory but was not.
Would you please file a bug on this?
Charlie"
Related branches
Changed in nunitv2: | |
assignee: | nobody → Charlie Poole (charlie.poole) |
importance: | Undecided → High |
milestone: | none → 2.5.3 |
status: | New → Triaged |
Changed in nunitv2: | |
status: | Triaged → Fix Committed |
Changed in nunitv2: | |
status: | Fix Committed → Fix Released |