Hi Richard,

Can you create a patch for your mod and append to the ticket?

That would be a massive help.

Thanks

Andy

On 6/14/07, Richard Louapre <[EMAIL PROTECTED]> wrote:
>
> I have just created a ticket (
> http://www.mertner.com/jira/browse/MBUNIT-134).
>
>
> On 6/14/07, Richard Louapre <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I think there is an issue when using ThreadedRepeat attribute. The CPU
> > goes to 100%.
> > Here is a simple sample:
> >
> >
> > [TestFixture]
> >
> > public class SimpleTestCase
> >
> > {
> >
> > [STAThread]
> >
> > static void Main(string[] args)
> >
> > {
> >
> > using (AutoRunner auto = new AutoRunner())
> >
> > {
> >
> > auto.Run();
> >
> > }
> >
> > }
> >
> > [Test]
> >
> > [ThreadedRepeat(2)]
> >
> > public void ExecuteTest()
> >
> > {
> >
> > try
> >
> > {
> >
> > Console.WriteLine("Execute ExecuteTest");
> >
> > for (int i=1; i < 10; i++)
> >
> > {
> >
> > Console.WriteLine("i:" + i);
> >
> > Thread.Sleep(5000);
> >
> > }
> >
> > }
> >
> > catch (Exception ex)
> >
> > {Console.WriteLine(ex.Message);}
> >
> > }
> >
> > }
> >
> >
> > I have modified ThreadCollectionRunner and replace all Thread.Sleep(0)
> > to Thread.Sleep(10) to fix this issue. I'm not sure if it is the best
> > fix, but now the CPU utilization is almost 0% running the test case.
> >
> > Would it be possible to include this fix (or better one) in the next
> > release?
> >
> > Thanks.
> >
> > Ciao,
> >    Richard.
> >
> > > >
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/MbUnitUser?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to