You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by pa...@apache.org on 2015/04/07 04:15:02 UTC
[8/9] drill git commit: DRILL-2632: Added assertion check to
DRILL-2463 test.
DRILL-2632: Added assertion check to DRILL-2463 test.
In Drill2463GetNullsFailedWithAssertionsBugTest, added check that Java
assertions are enabled, since test depends on their being enabled.
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/45d17549
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/45d17549
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/45d17549
Branch: refs/heads/master
Commit: 45d17549246aff453b4e21ffe62f3e42c8c72a35
Parents: efdad4c
Author: dbarclay <db...@maprtech.com>
Authored: Mon Mar 30 17:51:44 2015 -0700
Committer: Parth Chandra <pc...@maprtech.com>
Committed: Mon Apr 6 18:24:06 2015 -0700
----------------------------------------------------------------------
.../test/Drill2463GetNullsFailedWithAssertionsBugTest.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/45d17549/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2463GetNullsFailedWithAssertionsBugTest.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2463GetNullsFailedWithAssertionsBugTest.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2463GetNullsFailedWithAssertionsBugTest.java
index c8346b1..536a020 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2463GetNullsFailedWithAssertionsBugTest.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Drill2463GetNullsFailedWithAssertionsBugTest.java
@@ -43,6 +43,12 @@ public class Drill2463GetNullsFailedWithAssertionsBugTest extends JdbcTest {
public static void setUpConnection() throws SQLException {
connection = new Driver().connect( "jdbc:drill:zk=local", null );
statement = connection.createStatement();
+
+ boolean assertionsEnabled = false;
+ assert assertionsEnabled = true;
+ if ( ! assertionsEnabled ) {
+ throw new RuntimeException( "Assertions need to be enabled but are not." );
+ }
}
@AfterClass
@@ -73,7 +79,7 @@ public class Drill2463GetNullsFailedWithAssertionsBugTest extends JdbcTest {
@Test
public void testGetNonprimitiveTypeNullAsOwnType() throws Exception {
ResultSet rs = statement.executeQuery(
- "SELECT CAST( NULL AS VARCHAR) FROM INFORMATION_SCHEMA.CATALOGS" );
+ "SELECT CAST( NULL AS VARCHAR ) FROM INFORMATION_SCHEMA.CATALOGS" );
assert rs.next();
assertThat( "getString(...) for NULL", rs.getString( 1 ), nullValue() );
assertThat( "wasNull", rs.wasNull(), equalTo( true ) );