MudassarRasool / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

Tests with NCover2 are failing when more than one testcase is testing in parallel #575

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Just take some testcase and run two times in parallel. My MSBuild 
definition:
<Gallio
            Files="@(UnitTestAssemblies)"
            ReportTypes="html"
            ReportDirectory="$(WorkReportsUnitHtml)" 
            ReportNameFormat="index"
            IgnoreFailures="false"
            RunnerType="NCover2" />

What is the expected output? What do you see instead?
I want to run more than one testing process with NCover in parallel on CI 
without failures.

What version of the product are you using? On what operating system?
3.1.313.0

Please provide any additional information below.

Original issue reported on code.google.com by uldis.ka...@gmail.com on 29 Oct 2009 at 9:17

GoogleCodeExporter commented 8 years ago
What does the failure look like?

Original comment by jeff.br...@gmail.com on 2 Nov 2009 at 10:28

GoogleCodeExporter commented 8 years ago
Appeared it is not so easy to reproduce. On WindowsXP it works fine for both 
Ncover and 
Ncover2. On Windows Server 2003 SP2 it works fine only with Ncover. Check out 
log files 
what happens with Ncover2 

Original comment by uldis.ka...@gmail.com on 3 Nov 2009 at 8:03

Attachments:

GoogleCodeExporter commented 8 years ago
Unfortunately I don't see anything in the log that would help to explain the 
cause.

Try capturing a log with Debug verbosity.  This will be very big but we can 
throw out
everything before/after the Gallio test run.

You should see some messages from NCover get written out.  I wouldn't be too
surprised if the problem were related to NCover's IPC mechanism.  IIRC it 
creates a
new IPC channel dynamically on each invocation but the naming scheme is
time-sensitive.  I'd need to reverse-engineer that code again to find out.  I 
had
similar problems before when I used to run NCover v1.5.8 in-process rather than
spinning off a new process for each run because that version of NCover forgets 
to
close its IPC channel...

Original comment by jeff.br...@gmail.com on 3 Nov 2009 at 10:29

GoogleCodeExporter commented 8 years ago
I tried to set Debug="true". The process just exited with the same exception 
and opened 
empty Visual Studio. The Gallio with attribute Verbosity="Debug" failed only 
with 
second time. Check attached files.

Original comment by uldis.ka...@gmail.com on 3 Nov 2009 at 3:17

Attachments:

GoogleCodeExporter commented 8 years ago
Any progress on this?

Original comment by uldis.ka...@gmail.com on 26 Nov 2009 at 9:27

GoogleCodeExporter commented 8 years ago
I can see a couple of problems here.

First there's this:

D:\work\projects\PRCHaT_Main\Nightly_Build\576432\SCM\build\msbuild\Scripts\Comm
on\Main\codecoverage.targets
: warning : Forcibly killing the host process!

D:\work\projects\PRCHaT_Main\Nightly_Build\576432\SCM\build\msbuild\Scripts\Comm
on\Main\codecoverage.targets(29,3):
error : Host process exited with code: -1

I have no idea why Gallio is killing the process.  Usually it only does that 
sort of
thing if the process hangs.  In that case it would print some additional debug 
output.

The other error is this:

  Invalid NCover coverage xml file:

  C:\Documents and Settings\depanthill\Local Settings\Temp\Gallio\NCover\b2ip3iki.tux

That's a little easier to understand.  Because Gallio killed the previous 
process, it
probably didn't write a complete coverage file to disk for that process.  Later 
when
Gallio tries to merge in that coverage fail, it fails.  We should probably add a
check to ensure that the coverage file looks sane before merging it in.

Have you tried NCover 3?

Original comment by jeff.br...@gmail.com on 5 Jan 2010 at 12:38

GoogleCodeExporter commented 8 years ago
No, I haven`t because I have license only for NCover2.

Original comment by uldis.ka...@gmail.com on 5 Jan 2010 at 7:23

GoogleCodeExporter commented 8 years ago
I have the same problem in 3.1 build 397.  Running through TeamCity and 
MSBuildExtensions.  I have switched from using the NCover(1) runner to 
IsolatedProcess, 
and I still get the issue intermittently.  I have attached an excerpt from the 
log 
showing the exception that I am encountering.

Original comment by steve.cz...@gmail.com on 15 Mar 2010 at 5:39

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by Yann.Tre...@gmail.com on 19 Jul 2010 at 9:16

GoogleCodeExporter commented 8 years ago

Original comment by Yann.Tre...@gmail.com on 21 Sep 2010 at 1:45

GoogleCodeExporter commented 8 years ago
We are seeing the same thing running in a x64 environment (but single process). 
 This same process was working fine in our 32 bit build agent.  We are running 
Gallio under NCover 3 with TeamCity.  We did take NCover and TeamCity out of 
the picture and ran directly under Icarus on the agent and it raised a 
threading exception.

Original comment by robertre...@gmail.com on 11 Mar 2011 at 3:45

GoogleCodeExporter commented 8 years ago
What's the exception? I really wouldn't recommend using Icarus for unattended 
builds.

Original comment by grahamr...@gmail.com on 11 Mar 2011 at 4:05

GoogleCodeExporter commented 8 years ago

Original comment by Yann.Tre...@gmail.com on 14 Jun 2011 at 5:53