spmallette commented on a change in pull request #1081: TINKERPOP-2169/2173 
Responses exceeding maxContentLength cause subsequent queries to hang
URL: https://github.com/apache/tinkerpop/pull/1081#discussion_r264637234
 
 

 ##########
 File path: 
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
 ##########
 @@ -1102,10 +1099,12 @@ public void shouldFailOnDeadHost() throws Exception {
 
         try {
             // try to re-issue a request now that the server is down
-            client.submit("1+1").all().join();
-            fail();
+            client.submit("g").all().join();
+            fail("Should throw an exception.");
         } catch (RuntimeException re) {
-            assertThat(re.getCause().getCause() instanceof 
ClosedChannelException, is(true));
+            // Client would have no active connections to the host, hence it 
would encounter a timeout
+            // trying to find an alive connection to the host.
+            assertThat(re.getCause().getCause() instanceof TimeoutException, 
is(true));
 
 Review comment:
   This is a better exception than `ClosedChannelException` - cool

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to