You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "ryan rawson (JIRA)" <ji...@apache.org> on 2009/03/20 10:24:51 UTC

[jira] Created: (HBASE-1276) Upgrade to JUnit 4.x and use @BeforeClass annotations to optimize tests

Upgrade to JUnit 4.x and use @BeforeClass annotations to optimize tests
-----------------------------------------------------------------------

                 Key: HBASE-1276
                 URL: https://issues.apache.org/jira/browse/HBASE-1276
             Project: Hadoop HBase
          Issue Type: Bug
            Reporter: ryan rawson


If we upgrade to JUnit 4.x we can get access to @BeforeClass annotations... that allows us to start up DFS & Hbase only once per test class.  This should improve the speed of our unit tests substantially.

We will also need an ability to reset the hbase state between tests however.  Drop all tables for example.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HBASE-1276) [testing] Upgrade to JUnit 4.x and use @BeforeClass annotations to optimize tests

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack resolved HBASE-1276.
--------------------------

    Resolution: Fixed
      Assignee: stack

I just did some messing around with junit4.  We can put junit4 tests into our current test hierarchy and they are run out of ant in betwixt current tests.  The BeforeClass and AfterClass is sweet.  I'm going to now start working on converting over a bunch of our tests to use this stuff as part of another issue about speeding up unit tests.  So, I'll just resolve this now....

> [testing] Upgrade to JUnit 4.x and use @BeforeClass annotations to optimize tests
> ---------------------------------------------------------------------------------
>
>                 Key: HBASE-1276
>                 URL: https://issues.apache.org/jira/browse/HBASE-1276
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: test
>            Reporter: ryan rawson
>            Assignee: stack
>             Fix For: 0.21.0
>
>
> If we upgrade to JUnit 4.x we can get access to @BeforeClass annotations... that allows us to start up DFS & Hbase only once per test class.  This should improve the speed of our unit tests substantially.
> We will also need an ability to reset the hbase state between tests however.  Drop all tables for example.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1276) Upgrade to JUnit 4.x and use @BeforeClass annotations to optimize tests

Posted by "Nitay Joffe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688099#action_12688099 ] 

Nitay Joffe commented on HBASE-1276:
------------------------------------

Just ran across this: http://smallwiki.unibe.ch/jexample

Might be able to provide some better performance by reusing data.

> Upgrade to JUnit 4.x and use @BeforeClass annotations to optimize tests
> -----------------------------------------------------------------------
>
>                 Key: HBASE-1276
>                 URL: https://issues.apache.org/jira/browse/HBASE-1276
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: ryan rawson
>
> If we upgrade to JUnit 4.x we can get access to @BeforeClass annotations... that allows us to start up DFS & Hbase only once per test class.  This should improve the speed of our unit tests substantially.
> We will also need an ability to reset the hbase state between tests however.  Drop all tables for example.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1276) Upgrade to JUnit 4.x and use @BeforeClass annotations to optimize tests

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711025#action_12711025 ] 

stack commented on HBASE-1276:
------------------------------

It also has facility where you can ask it to expect that a section of code throws a particular exception (from Guilherme).

> Upgrade to JUnit 4.x and use @BeforeClass annotations to optimize tests
> -----------------------------------------------------------------------
>
>                 Key: HBASE-1276
>                 URL: https://issues.apache.org/jira/browse/HBASE-1276
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: ryan rawson
>
> If we upgrade to JUnit 4.x we can get access to @BeforeClass annotations... that allows us to start up DFS & Hbase only once per test class.  This should improve the speed of our unit tests substantially.
> We will also need an ability to reset the hbase state between tests however.  Drop all tables for example.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1276) [testing] Upgrade to JUnit 4.x and use @BeforeClass annotations to optimize tests

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748687#action_12748687 ] 

stack commented on HBASE-1276:
------------------------------

First part of this issue:  I updated our junit to 4.7.  It seems to run the old 3.8 tests fine.

> [testing] Upgrade to JUnit 4.x and use @BeforeClass annotations to optimize tests
> ---------------------------------------------------------------------------------
>
>                 Key: HBASE-1276
>                 URL: https://issues.apache.org/jira/browse/HBASE-1276
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: test
>            Reporter: ryan rawson
>             Fix For: 0.21.0
>
>
> If we upgrade to JUnit 4.x we can get access to @BeforeClass annotations... that allows us to start up DFS & Hbase only once per test class.  This should improve the speed of our unit tests substantially.
> We will also need an ability to reset the hbase state between tests however.  Drop all tables for example.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.