[jboss-jira] [JBoss JIRA] (AG-33) Calling close does not seem to close a connection

Paulo Lopes (JIRA) issues at jboss.org
Tue Sep 19 14:48:00 EDT 2017


Paulo Lopes created AG-33:
-----------------------------

             Summary: Calling close does not seem to close a connection
                 Key: AG-33
                 URL: https://issues.jboss.org/browse/AG-33
             Project: Agroal
          Issue Type: Bug
          Components: pool
    Affects Versions: 0.2
            Reporter: Paulo Lopes
            Assignee: Luis Barreiro


In vert.x we have the test:

{code}
  @Test
  public void testStreamOnClosedConnection() {
    String sql = "SELECT ID, FNAME, LNAME FROM select_table ORDER BY ID";
    final AtomicInteger cnt = new AtomicInteger(0);
    final SQLConnection conn = connection();

    conn.queryStream(sql, onSuccess(res -> {
      conn.close();

      res.resultSetClosedHandler(v -> {
        fail("Should not happen");
      }).handler(row -> {
        fail("Should not happen");
      }).endHandler(v -> {
        fail("Should not happen");
      }).exceptionHandler(t -> {
        testComplete();
      });
    }));

    await();
  }
{code}

Now once the query is run we call conn.close()  and all remaining handlers show fail except the exception handler, however the test fails and I do get the data from the result set.

This is quite strange since it works for other pools C3P0, Hikari, BoneCP.





--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list