Re: unhandled exception:objectdisposedexception

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <007b01c878e1$a0e8df90$6401a8c0@ferrari>
This is an old bug, which should be fixed in current version of NUnit.
 
Charlie


  _____  

From: [email protected]
[mailto:[email protected]] On Behalf Of Amrendra
Shrivastava (Tata Consultancy Services)
Sent: Tuesday, February 26, 2008 2:44 PM
To: [email protected]
Subject: [Nunit-users] unhandled exception:objectdisposedexception



Hi,

 

I am using Nunit version 2.2.8 and ran a simple Nunit test dll from the
console.

There were 5 failures in my tests

The failures were reported correctly:

Failures:

1)
ReportManagement.Api.Test.Integration.CreateReportTemplateAsmxTest.CreateRep
o

rtTestBase.BeyondMaxValidLengthReportName : Assert: The test is supposed to
fail

. But it did not.

   at
ReportManagement.Api.Test.Helper.AsmxTestHelper.ExecuteNegativeTest(TestAc

tion test, TestAction cleanup)

   at
ReportManagement.Api.Test.Helper.AsmxTestHelper.ExecuteNegativeTest(TestAc

tion test)

   at
ReportManagement.Api.Test.Helper.AsmxTestHelper.NegativeTestCreateReportTe

mplate(ReportManagementApi api, ReportRequest reportRequest, ReportSchedule
repo

rtSchedule, String templateName)

   at
ReportManagement.Api.Test.Helper.AsmxTestHelper.NegativeTestCreateReportTe

mplate(ReportManagementApi api, ReportRequest reportRequest)

   at
ReportManagement.Api.Test.Integration.CreateReportTestBase.BeyondMaxValidL

engthReportName()

 

2)
ReportManagement.Api.Test.Integration.CreateReportTemplateAsmxTest.CreateRep
o

rtTestBase.EmptyReportName : Assert: The test is supposed to fail. But it
did no

t.

   at
ReportManagement.Api.Test.Helper.AsmxTestHelper.ExecuteNegativeTest(TestAc

tion test, TestAction cleanup)

   at
ReportManagement.Api.Test.Helper.AsmxTestHelper.ExecuteNegativeTest(TestAc

tion test)

   at
ReportManagement.Api.Test.Helper.AsmxTestHelper.NegativeTestCreateReportTe

mplate(ReportManagementApi api, ReportRequest reportRequest, ReportSchedule
repo

rtSchedule, String templateName)

   at
ReportManagement.Api.Test.Helper.AsmxTestHelper.NegativeTestCreateReportTe

mplate(ReportManagementApi api, ReportRequest reportRequest)

   at
ReportManagement.Api.Test.Integration.CreateReportTestBase.EmptyReportName

()

 

3)
ReportManagement.Api.Test.Integration.CreateReportTemplateAsmxTest.CreateRep
o

rtTestBase.NullReportName : Assert: The test is supposed to fail. But it did
not

.

   at
ReportManagement.Api.Test.Helper.AsmxTestHelper.ExecuteNegativeTest(TestAc

tion test, TestAction cleanup)

   at
ReportManagement.Api.Test.Helper.AsmxTestHelper.ExecuteNegativeTest(TestAc

tion test)

   at
ReportManagement.Api.Test.Helper.AsmxTestHelper.NegativeTestCreateReportTe

mplate(ReportManagementApi api, ReportRequest reportRequest, ReportSchedule
repo

rtSchedule, String templateName)

   at
ReportManagement.Api.Test.Helper.AsmxTestHelper.NegativeTestCreateReportTe

mplate(ReportManagementApi api, ReportRequest reportRequest)

   at
ReportManagement.Api.Test.Integration.CreateReportTestBase.NullReportName(

)

 

4)
ReportManagement.Api.Test.Integration.GetPublisherEarningsAsmxTest.GetPublis
h

erEarnings : Assert: 2020Microsoft.AdCenter.Shared.Errors.Error-1Internal
error.

The operation can not be completed by
backend.127686ea-9037-49f1-9975-22e9c4ec15

bf

   at ReportManagement.Api.Test.Helper.AsmxTestHelper.ExecuteTest(TestAction
tes

t)

   at
ReportManagement.Api.Test.Helper.AsmxTestHelper.PositiveTestGetPublisherEa

rnings(ReportManagementApi api)

   at
ReportManagement.Api.Test.Integration.GetPublisherEarningsAsmxTest.GetPubl

isherEarnings()

 

5)
ReportManagement.Api.Test.Integration.GetReportTemplatesAsmxTest.MultipleFet
c

h : Assert: The feteched template is unexpected

   at ReportManagement.Api.Test.Helper.AsmxTestHelper.ExecuteTest(TestAction
tes

t)

   at
ReportManagement.Api.Test.Helper.AsmxTestHelper.PositiveTestGetReportTempl

ates(ReportManagementApi api, Int32 templateCount, Boolean needsCleanup)

   at
ReportManagement.Api.Test.Integration.GetReportTemplatesAsmxTest.MultipleF

etch()

 

But I have received the following error in the console:

Unhandled Exception: System.ObjectDisposedException: Cannot write to a
closed Te

xtWriter.

 

Server stack trace:

   at System.IO.__Error.WriterClosed()

   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean
flushEncoder)

   at System.IO.StreamWriter.Write(String value)

   at NUnit.ConsoleRunner.ConsoleUi.EventCollector.TestOutput(TestOutput
output)

 

   at
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(

IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInCont

ext, Object[]& outArgs)

   at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(R

untimeMethodHandle md, Object[] args, Object server, Int32 methodPtr,
Boolean fE

xecuteInContext, Object[]& outArgs)

   at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMes

sage msg, Int32 methodPtr, Boolean fExecuteInContext)

 

Exception rethrown at [0]:

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
req

Msg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgDa

ta, Int32 type)

   at NUnit.Core.EventListener.TestOutput(TestOutput testOutput)

   at NUnit.Core.OutputEvent.Send(EventListener listener)

   at NUnit.Core.EventPump.PumpThreadProc()

   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

   at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, C

ontextCallback callback, Object state)

   at System.Threading.ThreadHelper.ThreadStart()

 


Could some one explain this/solutions ??

 

Thanks,

Amrendra

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.