Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on reload when running in process #257

Closed
CharliePoole opened this issue Dec 31, 2018 · 5 comments
Closed

Error on reload when running in process #257

CharliePoole opened this issue Dec 31, 2018 · 5 comments
Assignees
Labels
Bug Something isn't working as expected. High Priority High priority issue
Milestone

Comments

@CharliePoole
Copy link
Contributor

I noticed this running the NUnit TestModel tests. There are two errors due to accessing an unloaded domain when reloading. This only occurs if the tests are run in process.

This needs a bit more research:

  1. Is it also happening when running tests under the experimental GUI?
  2. Does it happen in actual use of the GUI or only in the tests?
  3. Is it caused by the GUI or by the engine?
  4. If caused by the engine, is there a workaround?
@CharliePoole CharliePoole added Bug Something isn't working as expected. High Priority High priority issue labels Dec 31, 2018
@CharliePoole CharliePoole added this to the 1.0 milestone Dec 31, 2018
@CharliePoole CharliePoole self-assigned this Jan 1, 2019
@CharliePoole
Copy link
Contributor Author

Re points 1 and 2: I have confirmed that this happens in both GUI's tests and that an exception is thrown if you try to reload any test assembly in either GUI. So it's either the GUI model or the engine.

@CharliePoole
Copy link
Contributor Author

Also confirming that it happens with either the 3.8 or the 3.9 engine, so it's not a new engine issue.

@CharliePoole
Copy link
Contributor Author

Problem seems to be in the engine.

When running a single assembly in process, the chain of runners is

MasterTestRunner => MultipleTestDoainRunner => TestDomainRunner

After the call to Runner.Unload that chain is left intact but the framework driver continues to hold a reference to the domain with which it was originally created. That leads to an error, since the domain has been unloaded. We only see this when running in process because unloading a process runner causes the entire agent process to be terminated and reloading creates and re-initializes a new process. Running in a local domain should work analogously but doesn't.

I'm going to try to work around this but I'll also create an issue for the engine.

@CharliePoole
Copy link
Contributor Author

Created issue nunit/nunit-console#522

@CharliePoole
Copy link
Contributor Author

Problem remains when running in process. Possible regression when some unrelated PRs were merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working as expected. High Priority High priority issue
Projects
None yet
Development

No branches or pull requests

1 participant