Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: my junit test fails due to "took longer than 10.0 seconds andtherefore failed"

Reply
Thread Tools

Re: my junit test fails due to "took longer than 10.0 seconds andtherefore failed"

 
 
Daniel Pitts
Guest
Posts: n/a
 
      04-08-2010
On 4/8/2010 11:03 AM, www wrote:
> Hi,
>
> I have a junit test which runs 60 years data (the testing purpose is to
> make sure the program can handle long period computation).
>
> But recently, this test occasionally fails. (We develop on linux). When
> the machine is busy, this test fails, with the error message:
>
> "The run for xxxx took longer than 10.0 seconds and therefore failed".
>
> This problem happens from running in Eclipse or on terminal using ant.
>
> Can you help me on that?
>
> Thank you very much.

It sounds like your code has a timeout value somewhere (not a part of
JUnit AFAIK). It is that code which should be changed, or hopefully its
a configuration parameter, if the original developer had foresight.



--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
 
Reply With Quote
 
 
 
 
Tom Anderson
Guest
Posts: n/a
 
      04-08-2010
On Thu, 8 Apr 2010, Daniel Pitts wrote:

> On 4/8/2010 11:03 AM, www wrote:
>
>> I have a junit test which runs 60 years data (the testing purpose is to
>> make sure the program can handle long period computation).
>>
>> But recently, this test occasionally fails. (We develop on linux). When
>> the machine is busy, this test fails, with the error message:
>>
>> "The run for xxxx took longer than 10.0 seconds and therefore failed".
>>
>> This problem happens from running in Eclipse or on terminal using ant.

>
> It sounds like your code has a timeout value somewhere (not a part of JUnit
> AFAIK).


Definitely not a part of JUnit. We have JUnit tests, which we run in
Eclipse and from the command line, which take much longer than 10 seconds.

Much, much longer.

Does the error message come in the form of an exception? If so, the stack
trace will tell you where it came from, which is a good way to start
finding out why it was produced.

tom

--
In-jokes for out-casts
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Process.exec returning no output - command taking longer than 5 seconds the_one Java 1 03-05-2012 08:53 PM
How to convert Seconds to X Hours Y Minutes Z Seconds? 00_CP_D12 ASP .Net 3 02-22-2008 10:37 AM
1. Ruby result: 101 seconds , 2. Java result:9.8 seconds, 3. Perl result:62 seconds Michael Tan Ruby 32 07-21-2005 03:23 PM
Convert seconds to minutes and seconds tshad ASP .Net 7 03-11-2005 11:27 PM
test test test test test test test Computer Support 2 07-02-2003 06:02 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57