[ 
https://issues.apache.org/jira/browse/TINKERPOP-1467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15532494#comment-15532494
 ] 

ASF GitHub Bot commented on TINKERPOP-1467:
-------------------------------------------

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

    https://github.com/apache/tinkerpop/pull/441#discussion_r81113714
  
    --- Diff: 
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
 ---
    @@ -1248,6 +1250,73 @@ public void 
shouldProcessSessionRequestsInOrderAfterTimeout() throws Exception {
             }
         }
     
    +    @Test
    +    public void shouldCloseAllClientsOnCloseOfCluster() throws Exception {
    +        final Cluster cluster = Cluster.open();
    +        final Client sessionlessOne = cluster.connect();
    +        final Client session = cluster.connect("session");
    +        final Client sessionlessTwo = cluster.connect();
    +        final Client sessionlessThree = cluster.connect();
    +        final Client sessionlessFour = cluster.connect();
    +
    +        assertEquals(2, 
sessionlessOne.submit("1+1").all().get().get(0).getInt());
    +        assertEquals(2, session.submit("1+1").all().get().get(0).getInt());
    +        assertEquals(2, 
sessionlessTwo.submit("1+1").all().get().get(0).getInt());
    +        assertEquals(2, 
sessionlessThree.submit("1+1").all().get().get(0).getInt());
    +        // dont' send anything on the 4th client
    +
    +        // close one of these Clients before the Cluster
    +        sessionlessThree.close();
    +        cluster.close();
    +
    +        try {
    --- End diff --
    
    It is not verified, that exceptions are actually thrown. Should be more 
like:
    
    ```
    try {
        sessionXyz.submit("1+1").all().get();
        assertTrue(false);
    } catch (Exception ex) {
        ....
    ```


> Improve close() operations on the Java driver 
> ----------------------------------------------
>
>                 Key: TINKERPOP-1467
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1467
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: driver
>    Affects Versions: 3.1.3
>            Reporter: stephen mallette
>            Assignee: stephen mallette
>             Fix For: 3.1.5, 3.2.3
>
>
> A few big problems:
> 1. Client will hang if submitting a request after {{close()}}
> 2. Multiple calls to {{close()}} hangs periodically
> 3. Closing the {{Cluster}} doesn't attempt to clean up open {{Client}} 
> instances.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to