Re: BackgroundWorker problems

"Nassar, Anthony" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <[email protected]>
Forwarding...
 
My question was, is there any external evidence, beyond the DoWork event
getting called, that anything is happening? Because both Ian Wood and I
suspect that there is no background thread on which the work could be
done, and therefore nothing is in fact happening. You could try
debugging, and breaking within the code for the background task; you
could also write a simply task like changing the timestamp on a file,
just to verify non-programmatically that something is happening. 
________________________________

From: Lisle, Ron [mailto:[email protected]] 
Sent: Monday, November 12, 2007 5:42 PM
To: Nassar, Anthony
Subject: RE: [Nunit-users] BackgroundWorker problems


The form was split out into a DLL so that I can run it both in the
product and from the NUnit test harness. The work gets done when running
the same form in the product. When running under NUnit though only the
DoWork event gets called. The only "work" being done in the other 2
events is to set a flag to prove it was called.

 

You're suggestion regarding the message loop is a possibility. I don't
know the answer to that.

 

I've also seen references in one forum post stating that "NUnit is a
single threaded test harness", or something to that effect.

 

Thank you for responding. 

 

________________________________

From: Nassar, Anthony [mailto:[email protected]] 
Sent: Monday, November 12, 2007 4:00 PM
To: Lisle, Ron
Subject: RE: [Nunit-users] BackgroundWorker problems

 

Is the work getting done at all? I mean, do you have any evidence (since
the handlers aren't being called) that the work is getting done? Either
way, could it be because there's no message loop? Do you know how many
threads there actually are? Try to debug the test, and open the threads
panel and check. 

	 

	
________________________________


	From: [email protected]
[mailto:[email protected]] On Behalf Of Lisle,
Ron
	Sent: Monday, November 12, 2007 4:06 PM
	To: [email protected]
	Subject: [Nunit-users] BackgroundWorker problems

	I am trying to run NUnit tests against a form which includes the
System.ComponentModel.BackgroundWorker control. This control exposes 3
events: DoWork, ProgressChanged, and RunWorkerCompleted. During my NUnit
tests, I setup a handler for each, and set a flag to indicate that the
event was called correctly. However, I appear to only get calls into the
DoWork handler, not the other 2. This same code works correctly in my
product.

	 

	I've found via google searching a couple similar questions
posted to forums, but no response to those.

	 

	I've verified that I don't have try/catch statements along any
of test paths or event handlers.

	 

	Any ideas?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
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.