{"action":"created","issue":{"url":"https://api.github.com/repos/nunit/nunit/issues/329","repository_url":"https://api.github.com/repos/nunit/nunit","labels_url":"https://api.github.com/repos/nunit/nunit/issues/329/labels{/name}","comments_url":"https://api.github.com/repos/nunit/nunit/issues/329/comments","events_url":"https://api.github.com/repos/nunit/nunit/issues/329/events","html_url":"https://github.com/nunit/nunit/issues/329","id":47595009,"number":329,"title":"(CLI) Runner does not report AppDomain unloading timeout","user":{"login":"BrunoJuchli","id":2090172,"avatar_url":"https://avatars.githubusercontent.com/u/2090172?v=3","gravatar_id":"","url":"https://api.github.com/users/BrunoJuchli","html_url":"https://github.com/BrunoJuchli","followers_url":"https://api.github.com/users/BrunoJuchli/followers","following_url":"https://api.github.com/users/BrunoJuchli/following{/other_user}","gists_url":"https://api.github.com/users/BrunoJuchli/gists{/gist_id}","starred_url":"https://api.github.com/users/BrunoJuchli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrunoJuchli/subscriptions","organizations_url":"https://api.github.com/users/BrunoJuchli/orgs","repos_url":"https://api.github.com/users/BrunoJuchli/repos","events_url":"https://api.github.com/users/BrunoJuchli/events{/privacy}","received_events_url":"https://api.github.com/users/BrunoJuchli/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nunit/nunit/labels/is:bug","name":"is:bug","color":"fc2929"},{"url":"https://api.github.com/repos/nunit/nunit/labels/pri:high","name":"pri:high","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/nunit/nunit/milestones/21","html_url":"https://github.com/nunit/nunit/milestones/Backlog","labels_url":"https://api.github.com/repos/nunit/nunit/milestones/21/labels","id":1444615,"number":21,"title":"Backlog","description":"This pseudo-milestone contains all items accepted for implementation but not assigned to a specific milestone. Developers should give priority to work on the current milestone, but may also chose items from the backlog to work on.","creator":{"login":"CharliePoole","id":2678661,"avatar_url":"https://avatars.githubusercontent.com/u/2678661?v=3","gravatar_id":"","url":"https://api.github.com/users/CharliePoole","html_url":"https://github.com/CharliePoole","followers_url":"https://api.github.com/users/CharliePoole/followers","following_url":"https://api.github.com/users/CharliePoole/following{/other_user}","gists_url":"https://api.github.com/users/CharliePoole/gists{/gist_id}","starred_url":"https://api.github.com/users/CharliePoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CharliePoole/subscriptions","organizations_url":"https://api.github.com/users/CharliePoole/orgs","repos_url":"https://api.github.com/users/CharliePoole/repos","events_url":"https://api.github.com/users/CharliePoole/events{/privacy}","received_events_url":"https://api.github.com/users/CharliePoole/received_events","type":"User","site_admin":false},"open_issues":153,"closed_issues":1,"state":"open","created_at":"2015-12-04T17:34:57Z","updated_at":"2016-06-14T00:57:05Z","due_on":"2020-12-31T08:00:00Z","closed_at":null},"comments":8,"created_at":"2014-11-03T13:50:08Z","updated_at":"2016-06-14T18:45:53Z","closed_at":null,"body":"Currently `DomainManager.DomainUnloader.Unload` is silently* timing `AppDomain.Unload(domain) ` out after 30 seconds.\r\n\r\n* an entry like `09:35:36.420 Error [ 1] DomainManager: Unable to unload AppDomain test-domain-FOOBAR.dll, Unload thread timed out` is logged to the NUnit trace log (%AppData%\\..\\Local\\NUnit\\logs.\r\n\r\n[msdn](http://msdn.microsoft.com/en-us/library/system.appdomain.unload%28v=vs.110%29.aspx) states that\r\n\r\n>  If a thread does not abort, for example because it is executing unmanaged code, or because it is executing a finally block, then after a period of time a CannotUnloadAppDomainException is thrown in the thread that originally called Unload. If the thread that could not be aborted eventually ends, the target domain is not unloaded. Thus, in the .NET Framework version 2.0 domain is not guaranteed to unload, because it might not be possible to terminate executing threads. \r\n\r\nTo sum it up:\r\n* the `AppDomain` is not necessarily unloaded when `DomainUnloader.Unload` finishes\r\n * could this lead to issues when running other test assemblies subsequently?\r\n * it is still unloaded, however, when the process is exited (which is still possible)\r\n* the issue is not made visible to the user.\r\n* There is no statement made by microsoft how long `.Unload(domain)` takes before it times out with an `CannotUnloadAppDomainException`\r\n* `CannotUnloadAppDomainException` may indicate serious issues in either productive or test code\r\n * i don't know about the part \"for example because it is executing unmanaged code\"... i think when a unit test ends, so should all processing of the unit under test.\r\n\r\nAlso see https://groups.google.com/forum/#!topic/nunit-discuss/Y_qy00H44ZQ"},"comment":{"url":"https://api.github.com/repos/nunit/nunit/issues/comments/225978234","html_url":"https://github.com/nunit/nunit/issues/329#issuecomment-225978234","issue_url":"https://api.github.com/repos/nunit/nunit/issues/329","id":225978234,"user":{"login":"rprouse","id":493828,"avatar_url":"https://avatars.githubusercontent.com/u/493828?v=3","gravatar_id":"","url":"https://api.github.com/users/rprouse","html_url":"https://github.com/rprouse","followers_url":"https://api.github.com/users/rprouse/followers","following_url":"https://api.github.com/users/rprouse/following{/other_user}","gists_url":"https://api.github.com/users/rprouse/gists{/gist_id}","starred_url":"https://api.github.com/users/rprouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rprouse/subscriptions","organizations_url":"https://api.github.com/users/rprouse/orgs","repos_url":"https://api.github.com/users/rprouse/repos","events_url":"https://api.github.com/users/rprouse/events{/privacy}","received_events_url":"https://api.github.com/users/rprouse/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T18:45:53Z","updated_at":"2016-06-14T18:45:53Z","body":"For the shadow cache, :+1: \r\n\r\nFor the AppDomain, do you mean unload? If so, I am not sure. @BrunoJuchli states the error is trivial and I would agree in this situation, but can anyone think of errors that should cause test failures or should at least be exposed? If not, then :+1: "}}
{"actor":{"display_login":"rprouse"}}