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) {
....
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---