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

Luis Barreiro (JIRA) issues at jboss.org
Wed Nov 22 11:55:00 EST 2017


     [ https://issues.jboss.org/browse/AG-33?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luis Barreiro resolved AG-33.
-----------------------------
    Fix Version/s: 0.3
       Resolution: Done


> 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
>             Fix For: 0.3
>
>
> 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.5.0#75005)


More information about the jboss-jira mailing list