Most tests have a timeout of 1 second, which is much too low, especially if there is a spinning disk involved.
Getting rid of timeouts for tests. They aren't really necessary since the code isn't doing anything but straight-line code.
This message was automatically generated.
The timeouts are there in case the test hangs (e.g., disk failure). What will prevent maven getting stuck and eating a slot on the build server if there is no timeout?
you've actually turned off all the tests
Also, like AW notes, hadoop tests mandate a timeout, though we nowadays use per-suite timeout for easier maintenance. Look at AbstractFSContractTestBase to see how to use a test rule for that.
+Allen: maven itself has test run timeouts.
Allen Wittenauer, Steve Loughran, thanks for the review/advice. My initial thinking was to get rid of the specific timeouts on the tests so that they would just use the maven-wide timeout. But I agree that a test suite timeout is a better solution. Uploading a new patch that gets rid of the specific timeouts on each test, but adds a test suite timeout of 60 seconds. This is a very conservative timeout as the largest timeout of the tests beforehand was 10 seconds. So let me know if you think that it should be more aggressive.
the trouble with the maven timeout is that it just kills the whole JVM. As the junit test runner builds up the XML test report in memory, killing the JVM loses the entire log of the test run which failed out. This is generally considered of limited value when trying to work out why a test failed
Thanks for updating the patch, Eric!
Nit: I don't see the point of having a protected method for getting the test timeout value. For AbstractFSContractTestBase it makes sense since the whole point of that class is to be subclassed by the "real" tests. In this case nothing is going to subclass it, so it's just extra boilerplate with no purpose.
Thanks, Jason Lowe for the review! That makes sense. Uploading a new patch where I got rid of the protected method and just created the timeout straight up
+1 lgtm. I'll commit this later today if there are no objections.
Thanks to Eric for the contribution and to Steve and Allen for additional review! I committed this to trunk, branch-2, and branch-2.8.
SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11675 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11675/)
HADOOP-14306. TestLocalFileSystem tests have very low timeouts. (jlowe: rev cedaf4cab9d5013acd559dcb92d4976823ccdf85)