Prev: Security Policy to limit access to Printer or third party libraries
Next: What happened to J/Invoke?
From: Daniel Pitts on 8 Apr 2010 16:47 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/>
From: Tom Anderson on 8 Apr 2010 19:34 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
From: www on 9 Apr 2010 08:24 Thank you all. You are right. There is code there explicitly checking the total run time. If it is more than 10 seconds, fails the test. Sorry. I should have combed through the test code before posting the question. I thought it is a junit thing.
From: Daniel Pitts on 9 Apr 2010 15:03
On 4/9/2010 5:24 AM, www wrote: > Thank you all. You are right. There is code there explicitly checking > the total run time. If it is more than 10 seconds, fails the test. > > Sorry. I should have combed through the test code before posting the > question. I thought it is a junit thing. It isn't entirely your fault, the error message didn't give you enough context to identify the real problem. The developer of that "feature" of your unit-tests failed in that regard. -- Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/> |