> -----Original Message-----
> From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] 
> Sent: Tuesday, May 24, 2011 2:21
> To: Struts Developers List
> Subject: Re: Prefered test source organization
> 
> 2011/5/24 Jason Pyeron <jpye...@pdinc.us>:
> > I noticed that some test use logging and some do not.
> >
> > Is there a prefered way / style of writing unit tests for 
> core/xwork/plugins?
> 
> I think logging is the preferred way, but sometimes you can 
> use System.out
> 
> 
> > BTW, the patch on 
> https://issues.apache.org/jira/browse/WW-3633 needs review.
> 
> What about increasing sleep time ?

Normally the test will pass before the first loop. But, the half second delay
should 49.?% of the time, when a delay is needed, cover all the cases, in which
case a second loop will cover the remaining 99.?% of the cases. If this function
gets used in other tests, I did not want to keep adding time to the test length.

Now if we use a fixed time of 1 or 2 or 60 or 120, there are other problems that
can creep in. Take a NFS system, with clock drift, and a cron job every 5
minutes to fix the clock....

The fringe causes are endless, by specifiying a max timeout, testing for max
time out it is understandable why a test failed, and at the same time it should
have a minimal impact on the testing time length.


-Jason


--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.

 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to