OpenCover and Nunit-Agent closedown issue

Asked by Shaun Wilde

Hi

I keep getting reports of nunit-agent.exe not closing down when being run under OpenCover.exe. Now I don't know if OpenCover is directly responsible is just exacerbating an issue with nunit-agent.exe as I've never been able to replicate the issue on my development box.

https://github.com/sawilde/opencover/issues/94
https://github.com/sawilde/opencover/issues/118

I was wondering if anyone here has seen or is able to replicate the problem?

Thanks

Shaun

Question information

Language:
English Edit question
Status:
Answered
For:
NUnit V2 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Charlie Poole (charlie.poole) said :
#1

I haven't had any reports like that myself.

One small comment: use of /noshadow is highly discouraged. It appears that most people who use it do so because they can't figure out other ways to access the original directory from which the assembly was loaded. That has always been possible but it takes 5 or 6 lines of code rather than the single line (with Assembly.Location). In later versions of NUnit, there's no excuse since TestContext.TestDirectory gives you the location.

Since the Answers forum is only monitored by myself and one or two others, you may want to post your question to the nunit-discuss list (on google) where you can find more of the NUnit community. Hopefully, somebody there has seen this issue.

Charlie

Revision history for this message
Charlie Poole (charlie.poole) said :
#2

I should add... we do have reports from time to time of nunit-agent
not shutting down. These are often followed by other comments of the
nature "I have the same problem..." Of course, it's usually not the
same problem. :-)

Anyway, none of these have referenced OpenCover.

On Fri, Aug 31, 2012 at 5:01 PM, Charlie Poole
<email address hidden> wrote:
> Question #207401 on NUnit V2 changed:
> https://answers.launchpad.net/nunitv2/+question/207401
>
> Status: Open => Answered
>
> Charlie Poole proposed the following answer:
> I haven't had any reports like that myself.
>
> One small comment: use of /noshadow is highly discouraged. It appears
> that most people who use it do so because they can't figure out other
> ways to access the original directory from which the assembly was
> loaded. That has always been possible but it takes 5 or 6 lines of code
> rather than the single line (with Assembly.Location). In later versions
> of NUnit, there's no excuse since TestContext.TestDirectory gives you
> the location.
>
> Since the Answers forum is only monitored by myself and one or two
> others, you may want to post your question to the nunit-discuss list (on
> google) where you can find more of the NUnit community. Hopefully,
> somebody there has seen this issue.
>
> Charlie
>
> --
> You received this question notification because you are an answer
> contact for NUnit V2.

Revision history for this message
Shaun Wilde (shaun-wilde) said :
#3

Hi thanks for the response I'll redirect my query.

As I said I still don't know if OpenCover is responsible or is just exacerbating a known issue. Only nunit-agent is being reported as having this issue. I used to think that OpenCover was responsible as OpenCover creates a thread within the process and this thread could be seen running when everything else should be shut down. However I have since reworked the internals of OpenCover to not create this thread but the issue has gone from some people but not for others.

Can you help with this problem?

Provide an answer of your own, or ask Shaun Wilde for more information if necessary.

To post a message you must log in.