jroimartin commented on code in PR #1700:
URL: https://github.com/apache/tinkerpop/pull/1700#discussion_r903519013


##########
gremlin-go/driver/connection_test.go:
##########
@@ -1121,4 +1121,26 @@ func TestConnection(t *testing.T) {
                // This routine.
                assert.Equal(t, startCount, runtime.NumGoroutine())
        })
+
+       t.Run("Test per-request arguments", func(t *testing.T) {
+               skipTestsIfNotEnabled(t, integrationTestSuiteName, 
testNoAuthEnable)
+
+               g := getTestGraph(t, testNoAuthUrl, testNoAuthAuthInfo, 
testNoAuthTlsConfig)
+               defer g.remoteConnection.Close()
+
+               _, err := g.With("evaluationTimeout", 
10).Inject(1).SideEffect(&Lambda{"Thread.sleep(5000)", "gremlin-groovy"}).Next()
+               assert.NotNil(t, err)
+
+               _, err = g.With("evaluationTimeout", 
10000).Inject(1).SideEffect(&Lambda{"Thread.sleep(5000)", 
"gremlin-groovy"}).Next()
+               assert.Nil(t, err)
+
+               _, err = g.With("evaluationTimeout", 
10000).With("evaluationTimeout", 
10).Inject(1).SideEffect(&Lambda{"Thread.sleep(5000)", "gremlin-groovy"}).Next()
+               assert.NotNil(t, err)
+
+               _, err = 
g.WithStrategies(OptionsStrategy(map[string]interface{}{"evaluationTimeout": 
10})).Inject(1).SideEffect(&Lambda{"Thread.sleep(5000)", 
"gremlin-groovy"}).Next()
+               assert.NotNil(t, err)
+
+               _, err = 
g.WithStrategies(OptionsStrategy(map[string]interface{}{"evaluationTimeout": 
10000})).Inject(1).SideEffect(&Lambda{"Thread.sleep(5000)", 
"gremlin-groovy"}).Next()
+               assert.Nil(t, err)
+       })

Review Comment:
   I've been comparing the configuration used by the gremlin-go test server and 
a regular gremlin-server and I think I managed to reproduce the issue with the 
regular gremlin-server.
   
   In the generated docker container 
(`tinkerpop/gremlin-server:3.5.4-SNAPSHOT`) I modified 
`/opt/gremlin-server/conf/gremlin-server.yaml` in the following way:
   
   ```diff
   --- gremlin-server.yaml 2022-06-22 11:30:53.452370098 +0200
   +++ gremlin-server-repro.yaml   2022-06-22 11:27:50.000000000 +0200
   @@ -18,7 +18,7 @@
    host: 172.17.0.2
    port: 8182
    evaluationTimeout: 30000
   -channelizer: 
org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
   +channelizer: org.apache.tinkerpop.gremlin.server.channel.UnifiedChannelizer
    graphs: {
      graph: conf/tinkergraph-empty.properties}
    scriptEngines: {
   ```
   
   Again I'm not familiar with the code base of the project, but I hope this 
can serve as a hint for you.
   
   BTW given that this looks like a race condition and it is not always easy to 
reproduce them in a reliable way, take this information with a grain of salt. I 
don't want to waste people time with inaccurate information 
:slightly_smiling_face: 



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to