Re: Unit tests in 5 minutes

2014-12-06 Thread Nicholas Chammas
Ted, I posted some updates https://issues.apache.org/jira/browse/SPARK-3431?focusedCommentId=14236540page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14236540 on JIRA on my progress (or lack thereof) getting SBT to parallelize test suites properly. I'm currently stuck

Re: Unit tests in 5 minutes

2014-12-06 Thread Ted Yu
bq. I may move on to trying Maven. Maven is my favorite :-) On Sat, Dec 6, 2014 at 10:54 AM, Nicholas Chammas nicholas.cham...@gmail.com wrote: Ted, I posted some updates

Re: Unit tests in 5 minutes

2014-12-05 Thread Andrew Or
@Patrick and Josh actually we went even further than that. We simply disable the UI for most tests and these used to be the single largest source of port conflict.

Re: Unit tests in 5 minutes

2014-12-04 Thread Nicholas Chammas
fwiw, when we did this work in HBase, we categorized the tests. Then some tests can share a single jvm, while some others need to be isolated in their own jvm. Nevertheless surefire can still run them in parallel by starting/stopping several jvm. I think we need to do this as well. Perhaps the

Re: Unit tests in 5 minutes

2014-12-04 Thread Ted Yu
Have you seen this thread http://search-hadoop.com/m/JW1q5xxSAa2 ? Test categorization in HBase is done through maven-surefire-plugin Cheers On Thu, Dec 4, 2014 at 4:05 PM, Nicholas Chammas nicholas.cham...@gmail.com wrote: fwiw, when we did this work in HBase, we categorized the tests. Then

Re: Unit tests in 5 minutes

2014-08-09 Thread Mridul Muralidharan
Issue with supporting this imo is the fact that scala-test uses the same vm for all the tests (surefire plugin supports fork, but scala-test ignores it iirc). So different tests would initialize different spark context, and can potentially step on each others toes. Regards, Mridul On Fri, Aug

Unit tests in 5 minutes

2014-08-08 Thread Nicholas Chammas
Howdy, Do we think it's both feasible and worthwhile to invest in getting our unit tests to finish in under 5 minutes (or something similarly brief) when run by Jenkins? Unit tests currently seem to take anywhere from 30 min to 2 hours. As people add more tests, I imagine this time will only

Re: Unit tests in 5 minutes

2014-08-08 Thread Sean Owen
A common approach is to separate unit tests from integration tests. Maven has support for this distinction. I'm not sure it helps a lot though, since it only helps you to not run integration tests all the time. But lots of Spark tests are integration-test-like and are important to run to know a

Re: Unit tests in 5 minutes

2014-08-08 Thread Ted Yu
How about using parallel execution feature of maven-surefire-plugin (assuming all the tests were made parallel friendly) ? http://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html Cheers On Fri, Aug 8, 2014 at 9:14 AM, Sean Owen

Re: Unit tests in 5 minutes

2014-08-08 Thread Reynold Xin
ScalaTest actually has support for parallelization built-in. We can use that. The main challenge is to make sure all the test suites can work in parallel when running along side each other. On Fri, Aug 8, 2014 at 9:47 AM, Ted Yu yuzhih...@gmail.com wrote: How about using parallel execution

Re: Unit tests in 5 minutes

2014-08-08 Thread Reynold Xin
Nick, Would you like to file a ticket to track this? I think the first baby step is to log the amount of time each test cases take. This is supposed to happen already (see the flag), but somehow the time are not showing. If you have some time to figure that out, that'd be great.

Re: Unit tests in 5 minutes

2014-08-08 Thread Nicolas Liochon
fwiw, when we did this work in HBase, we categorized the tests. Then some tests can share a single jvm, while some others need to be isolated in their own jvm. Nevertheless surefire can still run them in parallel by starting/stopping several jvm. Nicolas On Fri, Aug 8, 2014 at 7:10 PM, Reynold

Re: Unit tests in 5 minutes

2014-08-08 Thread Matei Zaharia
Just as a note, when you're developing stuff, you can use test-only in sbt, or the equivalent feature in Maven, to run just some of the tests. This is what I do, I don't wait for Jenkins to run things. 90% of the time if it passes the tests that I know could break stuff, it will pass all of

Re: Unit tests in 5 minutes

2014-08-08 Thread Patrick Wendell
I dug around this a bit a while ago, I think if someone sat down and profiled the tests it's likely we could find some things to optimize. In particular, there may be overheads in starting up a local spark context that could be minimized and speed up all the tests. Also, there are some tests

Re: Unit tests in 5 minutes

2014-08-08 Thread Josh Rosen
One simple optimization might be to disable the application web UI in tests that don’t need it.  When running tests on my local machine while also running another Spark shell, I’ve noticed that the test logs fill up with errors when the web UI attempts to bind to the default port, fails, and

Re: Unit tests in 5 minutes

2014-08-08 Thread Patrick Wendell
Josh - that was actually fixed recently (we just bind to a random port when running tests). On Fri, Aug 8, 2014 at 12:00 PM, Josh Rosen rosenvi...@gmail.com wrote: One simple optimization might be to disable the application web UI in tests that don't need it. When running tests on my local