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

    https://github.com/apache/phoenix/pull/402#discussion_r229561363
  
    --- Diff: 
phoenix-core/src/it/java/org/apache/phoenix/end2end/ParallelStatsDisabledIT.java
 ---
    @@ -41,4 +53,29 @@ public static final void doSetup() throws Exception {
         public static void tearDownMiniCluster() throws Exception {
             BaseTest.tearDownMiniClusterIfBeyondThreshold();
         }
    +
    +    protected ResultSet executeQuery(Connection conn, QueryBuilder 
queryBuilder) throws SQLException {
    +        PreparedStatement statement = 
conn.prepareStatement(queryBuilder.build());
    +        ResultSet rs = statement.executeQuery();
    +        return rs;
    +    }
    +
    +    protected ResultSet executeQueryThrowsException(Connection conn, 
QueryBuilder queryBuilder,
    +            String expectedPhoenixExceptionMsg, String 
expectedSparkExceptionMsg) {
    +        ResultSet rs = null;
    +        try {
    +            rs = executeQuery(conn, queryBuilder);
    +        }
    +        catch(Exception e) {
    +            
assertTrue(e.getMessage().contains(expectedPhoenixExceptionMsg));
    +        }
    +        return rs;
    --- End diff --
    
    Do we ever want code to reach here? Or do we want to `Assert.fail` if the 
exception doesn't occur?


---

Reply via email to