geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Cabrera <Alan.Cabr...@reuters.com>
Subject RE: [status] build: SUCCESSFUL, test: FAILED | SunOS 5.8, 2004-05-15
Date Mon, 17 May 2004 12:45:52 GMT
Thanks Gianny.

One point about your fix:

As a rule, I try not to reformat code to bring it in line with my own
stylistic conventions.  I also try not to leave in debugging
scaffolding, i.e. main().  The reason for this is that it makes it
difficult to track what is the core of your fix.

If you feel strongly about putting those kinds of changes in, I
recommend that you perform two separate checkins, one for the fix and
one for the other changes.


Regards,
Alan

-----Original Message-----
From: gianny DAMOUR [mailto:gianny_damour@hotmail.com] 
Sent: Monday, May 17, 2004 8:41 AM
To: geronimo-dev@incubator.apache.org
Subject: Re: [status] build: SUCCESSFUL, test: FAILED | SunOS 5.8,
2004-05-15

David Blevins wrote:
>On Sat, May 15, 2004 at 09:40:00AM -0000, dblevins@apache.org wrote:
> >     [junit] [ERROR] TEST 
>org.apache.geronimo.connector.work.PooledWorkManagerTest FAILED
>
>Interesting.  Any idea why this test failed when there were no code 
>changes?  Is this a problem withe testing techique or the code?

I think that this issue is related to an incorrect testing technique:

For instance, the method testDoWork creates three Threads. Each Thread 
submits to the WorkManager a mock Work via WorkManager.doWork. As the 
maximum pool size of this WorkManager is one, these three Works are 
serialized.
Based on the time out provided to WorkManager.doWork (300ms) and the
time 
that each Work waits (200ms), the first two Works should be
WORK_COMPLETED 
when the three Threads have completed their WorkManager.doWork calls.

This assertion is true if the WorkManager is able to accept the second
Work 
before its time out. In other words, it must accept the second Work
before 
100ms (= 300ms - 200ms).

In some situation the WorkManager will not be able to accept the second
Work 
within this time frame. For instance, the thread scheduling could be 
affected by a "significant" load. In such a case, testDoWork fails.

I have slightly updated this unit test in order to alleviate the above 
problem (the WorkManager has now 500ms to accept a Work). Though, I am
not 
sure how to fix this problem for good.

Thanks,
Gianny

_________________________________________________________________
Dialoguez en direct et gratuitement avec vos amis sur 
http://g.msn.fr/FR1001/866 MSN Messenger !




-----------------------------------------------------------------
        Visit our Internet site at http://www.reuters.com

Get closer to the financial markets with Reuters Messaging - for more
information and to register, visit http://www.reuters.com/messaging

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.


Mime
View raw message