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

Stephen Mallette commented on TINKERPOP-2409:
---------------------------------------------

I don't seem to be able to get a hanging situation on 3.4.8. By "no connection" 
i assume i could recreate that by just not having Gremlin Server running. Is 
that right? That said, when I do that I don't get an error or anything...it 
just sorta "does nothing". I'm not always smart about javascript, but this was 
my test:

{code}
describe('Faulty Traversal', function () {
  describe("No Server Available", function () {
    it('should not hang', function() {
      const authenticator = new PlainTextSaslAuthenticator('no', 'matter');
      const g = traversal().withRemote(new 
DriverRemoteConnection('ws://localhost:9998/gremlin', {authenticator}));
      g.V().toList().then(function (list) {
        assert.ok(list);
        assert.strictEqual(list.length, 0);
      }).catch(function(err) {
        assert.fail();
      });
    });
  });
});
{code}

It just passes without error - sorta expected the {{catch()}} to do something, 
but i might not be doing something right. [~jorgebg] any thoughts on this one?

> js: DriverRemoteConnection never times out if server uri not available.
> -----------------------------------------------------------------------
>
>                 Key: TINKERPOP-2409
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2409
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: javascript
>    Affects Versions: 3.4.8
>            Reporter: Philip
>            Priority: Major
>
> constructor...
>      const authenticator = new 
> PlainTextSaslAuthenticator(userName,dbData.password)
>      this.dc = new DriverRemoteConnection(connectionStrArray.join(''), \{ 
> authenticator })
>     this.graph = new Graph()
>   
>  function code...
>      const g = this.graph.traversal().withRemote(this.dc)
>        let count = await g.V().count().next()
>        console.log(count)
>   
>  This works great with a connection but with no connection it failed with a 
> crash error in 3.3.8 - not ideal  but was manageable as code is always run as 
> a dynamic object per. In 3.4.8 when there is no connection it never resolves 
> or times out so it just hangs. 
> I haven't found a work around as yet
>   



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to