You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2015/07/09 17:08:04 UTC

[jira] [Commented] (PHOENIX-2103) Pig tests aren't dropping tables as expected between test runs

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

James Taylor commented on PHOENIX-2103:
---------------------------------------

Thanks for the patch, [~maghamravikiran]. It looks very close. Here's some minor feedback:
- Get rid of the doSetup() method as you don't need DROP_METADATA_ATTRIB set to true.
- Get rid of the tearDownAfterClass() method.
- Make conn and pigServer non static member variables.
- Remove the following member variables:
{code}
    private static HBaseTestingUtility hbaseTestUtil;
    private static String zkQuorum;
    private static Configuration conf;
{code}
- Establish the connection in the setUp() method in the standard way:
{code}
        Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
        conn = DriverManager.getConnection(url, props);
{code}
- Close the connection (with a non null check) in tearDown() method.
- No need to call super.cleanUpAfterTest(); yourself. It's an @After method and will get called on its own.

After these changes, if the tests pass, please commit to 4.x, 4.4, and master branches.


> Pig tests aren't dropping tables as expected between test runs
> --------------------------------------------------------------
>
>                 Key: PHOENIX-2103
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2103
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: maghamravikiran
>         Attachments: PHOENIX-2013-tests.patch
>
>
> Looks like PhoenixHBaseLoaderIT isn't derived from any of our base test classes (hence it would not drop tables between classes). It should be derived from BaseHBaseManagedTimeIT in which case it would call the @After cleanUpAfterTest() method to drop tables.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)