phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-3036) Modify phoenix IT tests to extend BaseHBaseManagedTimeTableReuseIT
Date Mon, 08 Aug 2016 18:11:20 GMT

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

ASF GitHub Bot commented on PHOENIX-3036:
-----------------------------------------

Github user samarthjain commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/189#discussion_r73924614
  
    --- Diff: phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java ---
    @@ -2063,5 +2080,35 @@ protected static void populateMultiCFTestTable(String tableName,
Date date) thro
             } finally {
                 conn.close();
             }
    -    }  
    +    }
    +
    +    protected static void verifySequence(String tenantID, String sequenceName, String
sequenceSchemaName, boolean exists) throws SQLException {
    +
    +        PhoenixConnection phxConn = DriverManager.getConnection(getUrl()).unwrap(PhoenixConnection.class);
    +        String ddl = "SELECT "
    +                + PhoenixDatabaseMetaData.TENANT_ID + ","
    +                + PhoenixDatabaseMetaData.SEQUENCE_SCHEMA + ","
    +                + PhoenixDatabaseMetaData.SEQUENCE_NAME
    +                + " FROM " + PhoenixDatabaseMetaData.SYSTEM_SEQUENCE
    +                + " WHERE ";
    +
    +        ddl += " TENANT_ID  " + ((tenantID == null ) ? "IS NULL " : " = '" + tenantID
+ "'");
    +        ddl += " AND SEQUENCE_NAME " + ((sequenceName == null) ? "IS NULL " : " = '"
+  sequenceName + "'");
    +        ddl += " AND SEQUENCE_SCHEMA " + ((sequenceSchemaName == null) ? "IS NULL " :
" = '" + sequenceSchemaName + "'" );
    +
    +        ResultSet rs = phxConn.createStatement().executeQuery(ddl);
    +        //boolean res =
    +        while(rs.next()){
    +            String ten = rs.getString("TENANT_ID");
    +            String seqN = rs.getString("SEQUENCE_SCHEMA");
    +            String seqaN = rs.getString("SEQUENCE_NAME");
    +            String seqNam = rs.getString("SEQUENCE_SCHEMA");
    +        }
    +        /*if(exists) {
    --- End diff --
    
    This shouldn't be commented out, I think.


> Modify phoenix IT tests to extend BaseHBaseManagedTimeTableReuseIT
> ------------------------------------------------------------------
>
>                 Key: PHOENIX-3036
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3036
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Samarth Jain
>            Assignee: prakul agarwal
>             Fix For: 4.9.0
>
>         Attachments: PHOENIX-3036.patch
>
>




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

Mime
View raw message