@Test(expected = SQLException.class)
  public void testConnectionTimeout() throws Exception {
    setupIDP(true, USER_PASS_MODE);
    try (TestHiveConnection connection = new TestHiveConnection(
        getSamlJdbcConnectionUrl(2), new Properties(), USER1, USER2_PASSWORD)) {
      fail(USER1 + " was logged in even with incorrect password");
    } catch (SQLException e) {
//      assertTrue("Unexpected error message", e.getMessage().contains(
//          HiveJdbcBrowserClient.TIMEOUT_ERROR_MSG));
      throw e;
    }
  }
Test makes sure that the if the user doesn't provide the right credentials the
connection timesout after the given timeout value.
itests/hive-unit/src/test/java/org/apache/hive/service/auth/saml/TestHttpSamlAuthentication.java