Return-Path: X-Original-To: apmail-sqoop-dev-archive@www.apache.org Delivered-To: apmail-sqoop-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0FE681750D for ; Sun, 1 Mar 2015 04:45:05 +0000 (UTC) Received: (qmail 8686 invoked by uid 500); 1 Mar 2015 04:45:04 -0000 Delivered-To: apmail-sqoop-dev-archive@sqoop.apache.org Received: (qmail 8643 invoked by uid 500); 1 Mar 2015 04:45:04 -0000 Mailing-List: contact dev-help@sqoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sqoop.apache.org Delivered-To: mailing list dev@sqoop.apache.org Received: (qmail 8632 invoked by uid 99); 1 Mar 2015 04:45:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Mar 2015 04:45:04 +0000 Date: Sun, 1 Mar 2015 04:45:04 +0000 (UTC) From: "Jarek Jarcec Cecho (JIRA)" To: dev@sqoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (SQOOP-2159) Sqoop2: Use BeforeSuite/AfterSuite for startHadoop/stopHadoop in integration tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SQOOP-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jarek Jarcec Cecho updated SQOOP-2159: -------------------------------------- Attachment: SQOOP-2159.patch > Sqoop2: Use BeforeSuite/AfterSuite for startHadoop/stopHadoop in integration tests > ---------------------------------------------------------------------------------- > > Key: SQOOP-2159 > URL: https://issues.apache.org/jira/browse/SQOOP-2159 > Project: Sqoop > Issue Type: Bug > Affects Versions: 1.99.5 > Reporter: Jarek Jarcec Cecho > Assignee: Jarek Jarcec Cecho > Fix For: 1.99.6 > > Attachments: SQOOP-2159.patch > > > I've noticed that {{BeforeClass}} annotation in test-ng is behaving slightly differently than I was expecting. For most integration tests it behaves as anticipated - it will run before any test methods inside any test class. However when it's used with {{@DataProvider}} it will be run for every parametrized call. This means that for example {{PartitionerTest}} will initialize the {{HadoopMiniCluster}} on all 20 executions, which is adding to the slowness of this test. > Test-ng have additional annotation called {{@BeforeSuite}} that will run only once even if given test class is using {{@DataProvider}} and hence I would suggest to use it for {{startHadoop()}} method. And similarly {{@AfterSuite}} for {{stopHadoop()}}. > I did not measure impact on {{PartitionerTest}}, but making this change for other integration test that I'm writing got the execution from 10 down to 3 minutes. -- This message was sent by Atlassian JIRA (v6.3.4#6332)