Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8B3967460 for ; Tue, 20 Sep 2011 20:28:34 +0000 (UTC) Received: (qmail 89487 invoked by uid 500); 20 Sep 2011 20:28:34 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 89459 invoked by uid 500); 20 Sep 2011 20:28:34 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 89444 invoked by uid 99); 20 Sep 2011 20:28:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Sep 2011 20:28:34 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Sep 2011 20:28:31 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id CCF8DA4A4B for ; Tue, 20 Sep 2011 20:28:10 +0000 (UTC) Date: Tue, 20 Sep 2011 20:28:10 +0000 (UTC) From: "Doug Meil (JIRA)" To: issues@hbase.apache.org Message-ID: <459946912.47516.1316550490835.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1778746808.45849.1316522049057.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-4448) HBaseTestingUtilityFactory - pattern for re-using HBaseTestingUtility instances across unit tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-4448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108978#comment-13108978 ] Doug Meil commented on HBASE-4448: ---------------------------------- The exposure of not stopping the miniclusters exists now. You need to explicitly stop it, so it's not really any different this way. System property works for me. > 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 > > > 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. For more information on JIRA, see: http://www.atlassian.com/software/jira