[ https://issues.apache.org/jira/browse/TINKERPOP-2913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17793372#comment-17793372 ]
ASF GitHub Bot commented on TINKERPOP-2913: ------------------------------------------- vkagamlyk commented on code in PR #2364: URL: https://github.com/apache/tinkerpop/pull/2364#discussion_r1416046901 ########## gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/traversal-test.js: ########## @@ -274,6 +274,27 @@ describe('Traversal', function () { }); }); + describe('not opened transactions', function() { + it('should not allow commit for not opened transactions', async function() { + const g = anon.traversal().withRemote(new MockRemoteConnection()); + const tx = g.tx(); + try { + await tx.commit(); + } catch (err) { + assert.strictEqual('Cannot commit a transaction that is not started', err.message); Review Comment: resolved in https://github.com/apache/tinkerpop/pull/2364/commits/c88e6518b67a5547cc4480c9bac1b6663d750a5a > Ensure that if tx.commit() is called remotely it does not hang for graphs > without transactions > ---------------------------------------------------------------------------------------------- > > Key: TINKERPOP-2913 > URL: https://issues.apache.org/jira/browse/TINKERPOP-2913 > Project: TinkerPop > Issue Type: Bug > Components: dotnet, go, javascript, python > Affects Versions: 3.5.5 > Reporter: Stephen Mallette > Priority: Critical > > Javascript has been reported to hang if you do a {{tx.commit()}} and the > remote graph does not support transactions (i.e. TinkerGraph). It should > return an exception similar to how Java does: > {code} > gremlin> tx.commit() > Transaction commit for Optional.empty failed > Type ':help' or ':h' for help. > Display stack trace? [yN]y > .... > Caused by: java.util.concurrent.CompletionException: > org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Graph does > not support transactions > at > java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:375) > at > java.util.concurrent.CompletableFuture.join(CompletableFuture.java:1947) > at org.apache.tinkerpop.gremlin.driver.ResultSet.one(ResultSet.java:123) > at > org.apache.tinkerpop.gremlin.driver.ResultSet$1.hasNext(ResultSet.java:175) > at > org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal$TraverserIterator.hasNext(DriverRemoteTraversal.java:110) > at > org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal.hasNext(DriverRemoteTraversal.java:70) > at > org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTransaction.closeRemoteTransaction(DriverRemoteTransaction.java:95) > ... 70 more > Caused by: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: > Graph does not support transactions > at > org.apache.tinkerpop.gremlin.driver.Handler$GremlinResponseHandler.channelRead0(Handler.java:245) > at > org.apache.tinkerpop.gremlin.driver.Handler$GremlinResponseHandler.channelRead0(Handler.java:200) > at .... > {code} > Check all non-java drivers and provide tests to enforce the appropriate > behavior. It would be worth examining behavior of all {{tx}} methods like > {{rollback()}} and {{close()}} as well. can this be somehow part of the > gherkin test suite rather than one-off tests? -- This message was sent by Atlassian Jira (v8.20.10#820010)