Github user twdsilva commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/402#discussion_r229889691
--- 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 --
we should fail if an exception is not thrown, I fixed this.
---