Re: Policy on adding timeouts to tests

2014-04-18 Thread Kihwal Lee
The most common mistake is making incorrect assumptions on test/component run-time. We often forget how slower/faster things can be on different platforms and how the load on the machine at the time of test execution affect the run time. If not sure, leave it to surefire. If things run generally s

Re: Policy on adding timeouts to tests

2014-04-16 Thread Vinod Kumar Vavilapalli
The other advantage of timeout is early failure - earlier than the uber 10 min timeout that seems to exist in the build files. Usually the test-writer has a general idea of how long the test is supposed to run and if that doesn't happen, we can fail early. Clearly, this involves choosing a reaso

Re: Policy on adding timeouts to tests

2014-04-16 Thread Andrew Wang
The timeouts are nice when trying to debug test failures on Jenkins, because otherwise you just see something like this: Caused by: java.lang.RuntimeException: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? We still see this today because some tests lac

Re: Policy on adding timeouts to tests

2014-04-16 Thread Tsuyoshi OZAWA
Hi Karthik, Some tests with servers like MiniCluster or ZK can never end because of unexpected busy loop or something if the tests don't have timeouts. It can blocks the other jobs of Jenkins server. Therefore, IMHO, we should add timeouts when we write tests with them. Thanks, - Tsuyoshi On Wed

Re: Policy on adding timeouts to tests

2014-04-16 Thread Steve Loughran
There's a JIRA somewhere that 's never gone in, to add a timeout rule to a base class; this rule gets picked up in that test class and all children to specify the timeout @Rule public final Timeout testTimeout = new Timeout(TEST_TIMEOUT); 1. If we are going to have a timeout everywhere, i

Re: Policy on adding timeouts to tests

2014-04-15 Thread Karthik Kambatla
- hwx-hdfs-dev + hdfs-dev Agree with all the points Chris makes. I asked this question in the context of a fix that bumps up the timeout to make the test pass on slower machines. If the timeout is not central to the test, is the recommended approach to get rid of the timeout? On Tue, Apr 15, 2

Re: Policy on adding timeouts to tests

2014-04-15 Thread Chris Nauroth
+common-dev, hdfs-dev My understanding of the current situation is that we had a period where we tried to enforce adding timeouts on all new tests in patches, but it caused trouble, and now we're back to not requiring it. Jenkins test-patch isn't checking for it anymore. I don't think patches ar