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

    https://github.com/apache/drill/pull/1024#discussion_r149278905
  
    --- Diff: exec/jdbc/src/test/java/org/apache/drill/jdbc/StatementTest.java 
---
    @@ -61,55 +71,129 @@ public static void tearDownStatement() throws 
SQLException {
       //////////
       // getQueryTimeout():
     
    -  /** Tests that getQueryTimeout() indicates no timeout set. */
    +  /**
    +   * Test for reading of default query timeout
    +   */
       @Test
    -  public void testGetQueryTimeoutSaysNoTimeout() throws SQLException {
    -    assertThat( statement.getQueryTimeout(), equalTo( 0 ) );
    +  public void testDefaultGetQueryTimeout() throws SQLException {
    +    Statement stmt = connection.createStatement();
    +    int timeoutValue = stmt.getQueryTimeout();
    +    assert( 0 == timeoutValue );
    --- End diff --
    
    I personally prefer the old construct using hamcrest. This `assert` is 
actually less useful for two reasons:
    - there's no error message (hamcrest prints a nice error message based on 
the arguments)
    - if the assert fails, you don't know `timeoutValue`'s value


---

Reply via email to