[ 
https://issues.apache.org/jira/browse/HBASE-4448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13118894#comment-13118894
 ] 

stack commented on HBASE-4448:
------------------------------

bq. This is the situation now, though. 

Sort of.  We kill the JVM out from under it so all context is wiped so for sure 
all is cleaned up -- we're not completely dependent on tests being thorough 
about cleanup.  Even still it looks like we manage to keep around running zk 
ensembles which has been responsible for some of the fails up on jenkins of 
late.

bq. When tests run in parallel, are we talking Test-classes, or test-methods?

Classes and NOT in separate jvms.  I couldn't make it work.  Seems like 
surefire-plugin is a little buggy doing tests in parallel; its a newish feature.

bq. If there are a pool of JVMs that get used throughout a build then this can 
work.

This would imply surefire-plugin modifications.

bq. I'd still like to lobby for something like this because unless 
cluster-startup and teardown can be amazingly fast, we're leaving 10-15 minutes 
on the floor easy every time we run the build - and that's just for the common 
cluster configs.

Yeah.  Making cluster up and down faster looks like it would take a bit of work 
(see some notes above where a second is spent putting up hdfs web uis that are 
never used and another second could probably be saved if we didn't make meta 
and root regions each startup (I didn't look at shutdown).

Can we work on aggregating our tests more so that more tests get run everytime 
we spin up a cluster (too many tests spin up cluster and then run one test 
only).  I was looking through your spreadsheet to see what to coalesce.

                
> HBaseTestingUtilityFactory - pattern for re-using HBaseTestingUtility 
> instances across unit tests
> -------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4448
>                 URL: https://issues.apache.org/jira/browse/HBASE-4448
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Doug Meil
>            Assignee: Doug Meil
>            Priority: Minor
>         Attachments: HBaseTestingUtilityFactory.java, 
> hbase_hbaseTestingUtility_uses_2011_09_22.xlsx, java_HBASE_4448.patch, 
> java_HBASE_4448_v2.patch
>
>
> Setting up and tearing down HBaseTestingUtility instances in unit tests is 
> very expensive.  On my MacBook it takes about 10 seconds to set up a 
> MiniCluster, and 7 seconds to tear it down.  When multiplied by the number of 
> test classes that use this facility, that's a lot of time in the build.
> This factory assumes that the JVM is being re-used across test classes in the 
> build, otherwise this pattern won't work. 
> I don't think this is appropriate for every use, but I think it can be 
> applicable in a great many cases - especially where developers just want a 
> simple MiniCluster with 1 slave.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to