rahulpandey87 / mb-unit

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

System.AppDomainUnloadedException when using /runner:IsolatedAppDomain #856

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Run Gallio.Echo.exe from a  shell with test assemblies using NUnit:

Gallio.Echo.exe /v:Debug /runner:IsolatedAppDomain 
/report-directory:C:/Users/fbertoldi/Gallio-Reports 
/report-name-format:gallio-report /report-type:Html 
E:\trunk\Barauna.Math.Tests\bin\Debug\Barauna.Mathematics.Tests.dll 
E:\trunk\Barauna.Simulator.Machine.NeoCut.Tests\bin\Debug\Barauna.Simulator.Mach
ine.NeoCut.Tests.dll 
E:\trunk\Barauna.Presenter.Testsbin\Debug\Barauna.Presenter.Tests.dll &> 
gallio.output.isolatedappdomain.log.$(date +%s)

What is the expected output? What do you see instead?

Gallio should run the tests without throwing exceptions. Instead it throws 
System.AppDomainUnloadedException between the execution of test assemblies:

...
[starting] 
Barauna.Mathematics.Tests/Barauna/Mathematics/Tests/Size2DTests/TestMultiplyBySc
alar
[passed] Test 
Barauna.Mathematics.Tests/Barauna/Mathematics/Tests/Size2DTests/TestMultiplyBySc
alar
Internal error: An unhandled exception occurred.
System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.

[starting] 
Barauna.Simulator.Machine.NeoCut.Tests/Barauna/Simulator/Machine/NeoCut/Tests/Ma
chineCommandParserTest/CanAddCommandThatBelongsToBeginningOfAnotherTree
[passed] Test 
Barauna.Simulator.Machine.NeoCut.Tests/Barauna/Simulator/Machine/NeoCut/Tests/Ma
chineCommandParserTest/CanAddCommandThatBelongsToBeginningOfAnotherTree
...

What version of the product are you using? On what operating system?
Gallio v3.2.750.0-x64 on a Windows 7 SP1 64 bits.

Please provide any additional information below.

This defect doesn't occur when using the Local test runner. The gallio 
execution log is provided as attachment.

Original issue reported on code.google.com by fcberto...@gmail.com on 30 Aug 2011 at 7:23

Attachments:

GoogleCodeExporter commented 8 years ago
I'd like to push this bug upwards as well.
I'm running a test that works with a DataServiceHost and the test seems to be 
working fine in Visual Studio, TestDriven.NET and the Gallio integration inside 
VS.

When I run the test however on my buildagents (Windows 7) I'm getting te 
following output:

[08:42:46]: TenForce.Execution.Api2.OData.Tests (17s)
[08:42:55]: [TenForce.Execution.Api2.OData.Tests] 
TenForce.Execution.Api2.OData.Tests/AttachmentIntegrationTests (8s)
[08:42:56]: [TenForce.Execution.Api2.OData.Tests/AttachmentIntegrationTests] 
/AttachmentUpload (7s)
[08:43:03]: [/AttachmentUpload] [Test Output] Unable to read configuration 
section common/logging. Using no-op implemenation.
[08:43:03]: [/AttachmentUpload] failed
[08:43:03]: [/AttachmentUpload] Execute System.Net.WebException: The remote 
server returned an error: (500) Internal Server Error. Status: ProtocolError 
Response: System.Net.HttpWebResponse at System.Net.WebClient.UploadFile(Uri 
address, String method, String fileName) at System.Net.WebClient.UploadFile(Uri 
address, String fileName) at System.Net.WebClient.UploadFile(String address, 
String fileName) at 
TenForce.Execution.Api2.OData.Tests.Helpers.ODataClient.UploadAttachment(String 
path, Int32 itemId) in 
c:\Robinson\trunk\Projects\Robinson\TenForce.Execution.Api2.OData.Tests\Helpers\
ODataClient.cs:line 69 at 
TenForce.Execution.Api2.OData.Tests.IntegrationTests.AttachmentIntegrationTests.
AttachmentUpload() in 
c:\Robinson\trunk\Projects\Robinson\TenForce.Execution.Api2.OData.Tests\Integrat
ionTests\AttachmentIntegrationTests.cs:line 64
[08:43:03]: [exec] [failed] Test 
TenForce.Execution.Api2.OData.Tests/AttachmentIntegrationTests/AttachmentUpload
[08:43:03]: [exec] Execute
[08:43:03]: [exec] System.Net.WebException: The remote server returned an 
error: (500) Internal Server Error.
[08:43:03]: [exec] Status: ProtocolError
[08:43:03]: [exec] Response: System.Net.HttpWebResponse
[08:43:03]: [exec] at System.Net.WebClient.UploadFile(Uri address, String 
method, String fileName)
[08:43:03]: [exec] at System.Net.WebClient.UploadFile(Uri address, String 
fileName)
[08:43:03]: [exec] at System.Net.WebClient.UploadFile(String address, String 
fileName)
[08:43:03]: [exec] at 
TenForce.Execution.Api2.OData.Tests.Helpers.ODataClient.UploadAttachment(String 
path, Int32 itemId) in 
c:\Robinson\trunk\Projects\Robinson\TenForce.Execution.Api2.OData.Tests\Helpers\
ODataClient.cs:line 69
[08:43:03]: [exec] at 
TenForce.Execution.Api2.OData.Tests.IntegrationTests.AttachmentIntegrationTests.
AttachmentUpload() in 
c:\Robinson\trunk\Projects\Robinson\TenForce.Execution.Api2.OData.Tests\Integrat
ionTests\AttachmentIntegrationTests.cs:line 64
[08:43:04]: [exec] Internal error: An unhandled exception occurred.
[08:43:04]: [exec] System.AppDomainUnloadedException: Attempted to access an 
unloaded AppDomain.
[08:43:04]: [exec] Internal error: An unhandled exception occurred.
[08:43:04]: [exec] System.AppDomainUnloadedException: Attempted to access an 
unloaded AppDomain.
[08:43:04]: [exec] Disposing the test runner.
[08:43:04]: [exec] Disposed test runner.' flowId='a7e1081892c07db9
[08:43:04]: [exec] Stop time: 8:43 (Total execution time: 20,232 seconds)
[08:43:04]: [exec] 1 run, 0 passed, 1 failed, 0 inconclusive, 0 skipped
[08:43:04]: [exec] [20718] [02848] CorProfiler is turned off
[08:43:04]: [exec] Target PageFaultCount: 56479
[08:43:04]: [exec] Target PagefileUsage: 63549440
[08:43:04]: [exec] Target PeakPagefileUsage: 124743680
[08:43:04]: [exec] Target PeakWorkingSetSize: 132292608
[08:43:04]: [exec] Target QuotaNonPagedPoolUsage: 30136
[08:43:04]: [exec] Target QuotaPagedPoolUsage: 233188
[08:43:04]: [exec] Target QuotaPeakNonPagedPoolUsage: 52670
[08:43:04]: [exec] Target QuotaPeakPagedPoolUsage: 533132
[08:43:04]: [exec] Target WorkingSetSize: 73424896
[08:43:05]: [exec] Total 0 bytes
[08:43:05]: External Program Failed: c:\Robinson\tools\PartCover\Partcover.exe 
(return code was 1)
[08:43:05]: Process exited with code 1
[08:43:05]: NAnt output:
[08:43:05]: [exec]
[08:43:05]: [exec] Internal error: An unhandled exception occurred.
[08:43:05]: [exec] System.AppDomainUnloadedException: Attempted to access an 
unloaded AppDomain.
[08:43:05]: [exec]
[08:43:05]: [exec]
[08:43:05]: ##teamcity[progressFinish 'Running tests.|' 
flowId=|'a7e1081892c07db9']
[08:43:05]: [exec] Disposing the test runner.
[08:43:05]: [exec]
[08:43:05]: ##teamcity[progressMessage 'Disposed test runner.|' 
flowId=|'a7e1081892c07db9']
[08:43:05]: [exec] Stop time: 8:43 (Total execution time: 20,232 seconds)
[08:43:05]: [exec]
[08:43:05]: [exec] 1 run, 0 passed, 1 failed, 0 inconclusive, 0 skipped
[08:43:05]: [exec]
[08:43:05]: [exec] [20718] [02848] CorProfiler is turned off
[08:43:05]: [exec] Target PageFaultCount: 56479
[08:43:05]: [exec] Target PagefileUsage: 63549440
[08:43:05]: [exec] Target PeakPagefileUsage: 124743680
[08:43:05]: [exec] Target PeakWorkingSetSize: 132292608
[08:43:05]: [exec] Target QuotaNonPagedPoolUsage: 30136
[08:43:05]: [exec] Target QuotaPagedPoolUsage: 233188
[08:43:05]: [exec] Target QuotaPeakNonPagedPoolUsage: 52670
[08:43:05]: [exec] Target QuotaPeakPagedPoolUsage: 533132
[08:43:05]: [exec] Target WorkingSetSize: 73424896
[08:43:05]: [exec] Total 0 bytes
[08:43:05]: BUILD FAILED - 0 non-fatal error(s), 25 warning(s)
[08:43:05]: External Program Failed: c:\Robinson\tools\PartCover\Partcover.exe 
(return code was 1)

Original comment by arne.de....@gmail.com on 9 Sep 2011 at 6:52

GoogleCodeExporter commented 8 years ago
3 months, and this not even looked at?

Original comment by arne.de....@gmail.com on 24 Nov 2011 at 4:06

GoogleCodeExporter commented 8 years ago
Can you provide a sample that reproduces the problem?

Original comment by grahamr...@gmail.com on 27 Nov 2011 at 8:01

GoogleCodeExporter commented 8 years ago
if I knew the specific reason of the issue, I would try to change the project 
so it will not cause the crash. Unfortunatly the project is quite big and it 
will take significant amount of time to strip it in order to keep just a sample 
to reproduce. If I could check for something specific in unit tests or the 
project itself or configuration - let me know what should I look for, and I 
will let you know whether it is a case.

Original comment by egor.kob...@gmail.com on 28 Nov 2011 at 9:41

GoogleCodeExporter commented 8 years ago
Unfortunately that log isn't much use :( I can try & reproduce it, but it could 
be anything.

Original comment by grahamr...@gmail.com on 28 Nov 2011 at 7:13