You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Sqoop QA bot (JIRA)" <ji...@apache.org> on 2015/03/01 06:25:05 UTC
[jira] [Commented] (SQOOP-2159) Sqoop2: Use BeforeSuite/AfterSuite
for startHadoop/stopHadoop in integration tests
[ https://issues.apache.org/jira/browse/SQOOP-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14341945#comment-14341945 ]
Sqoop QA bot commented on SQOOP-2159:
-------------------------------------
Testing file [SQOOP-2159.patch|https://issues.apache.org/jira/secure/attachment/12701670/SQOOP-2159.patch] against branch sqoop2 took 0:34:00.004554.
{color:green}Overall:{color} +1 all checks pass
{color:green}SUCCESS:{color} Clean was successful
{color:green}SUCCESS:{color} Patch applied correctly
{color:green}SUCCESS:{color} Patch add/modify test case
{color:green}SUCCESS:{color} License check passed
{color:green}SUCCESS:{color} Patch compiled
{color:green}SUCCESS:{color} All fast unit tests passed (executed 256 tests)
{color:green}SUCCESS:{color} All slow unit tests passed (executed 1 tests)
{color:green}SUCCESS:{color} All fast integration tests passed (executed 15 tests)
{color:green}SUCCESS:{color} All slow integration tests passed (executed 0 tests)
Console output is available [here|https://builds.apache.org/job/PreCommit-SQOOP-Build/1119/console].
This message is automatically generated.
> 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)