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

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

Cole-Greer commented on code in PR #2525:
URL: https://github.com/apache/tinkerpop/pull/2525#discussion_r1542198439


##########
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthIntegrateTest.java:
##########
@@ -163,6 +171,46 @@ public void 
shouldFailAuthenticateWithPlainTextBadUsername() throws Exception {
         }
     }
 
+    @Test
+    public void 
shouldFailAuthenticateWithUnAuthenticatedRequestAfterMaxDeferrableDuration() 
throws Exception {

Review Comment:
   Hi Tien, I want to be absolutely certain that we aren’t going to lose any of 
these deferred requests in the case of errors. If the server fails to send a 
response the drivers will just be left hanging indefinitely. If I’m 
understanding this test right, the first 3 requests are all expected to 
succeed, and then after a delay the final request is submitted and fails. Would 
it also be possible to setup a test such that there are multiple pending 
requests in the server’s deferred requests queue at the time that auth fails, 
and then we can verify that the correct error message gets sent to all 
currently pending requests?





> Concurrent queries will break authentication on javascript driver
> -----------------------------------------------------------------
>
>                 Key: TINKERPOP-3061
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3061
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: javascript
>    Affects Versions: 3.6.6, 3.7.1
>            Reporter: Yang Xia
>            Priority: Major
>
> Reported by tien on Discord:
> {code:java}
> import gremlin from "gremlin";
> const g = gremlin.process.AnonymousTraversalSource.traversal().withRemote(
>   new gremlin.driver.DriverRemoteConnection("ws://localhost:8182/gremlin", {
>     authenticator: new gremlin.driver.auth.PlainTextSaslAuthenticator(
>       "admin",
>       "administrator"
>     ),
>   })
> );
> // This will throws: Failed to authenticate (401)
> await Promise.all([g.V().toList(), g.V().toList()]);
> // This works as expected
> await g.V().toList();
> await g.V().toList(); {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to