GumpacG commented on code in PR #3397:
URL: https://github.com/apache/tinkerpop/pull/3397#discussion_r3149523184
##########
gremlin-go/driver/connection_test.go:
##########
@@ -775,6 +778,35 @@ func TestConnection(t *testing.T) {
assert.Greater(t, len(props), 0)
}
})
+
+ t.Run("Test bulkResults with DRC request option", func(t *testing.T) {
+ skipTestsIfNotEnabled(t, integrationTestSuiteName,
testNoAuthEnable)
+
+ g := getModernGraph(t, testNoAuthUrl, &tls.Config{})
+ defer g.remoteConnection.Close()
+
+ // bulkResults is defaulted to true in submitGremlinLang,
results should still be correct
+ results, err := g.Inject(1, 2, 3, 2, 1).ToList()
+ assert.Nil(t, err)
+ assert.Equal(t, 5, len(results))
+ })
+
+ t.Run("Test bulkResults with explicit With option", func(t *testing.T) {
+ skipTestsIfNotEnabled(t, integrationTestSuiteName,
testNoAuthEnable)
+
+ g := getModernGraph(t, testNoAuthUrl, &tls.Config{})
+ defer g.remoteConnection.Close()
+
+ // explicitly set bulkResults to true via With
+ results, err := g.With("bulkResults", true).Inject(1, 2, 3, 2,
1).ToList()
+ assert.Nil(t, err)
+ assert.Equal(t, 5, len(results))
+
+ // explicitly set bulkResults to false via With
+ results, err = g.With("bulkResults", false).Inject(1, 2, 3, 2,
1).ToList()
+ assert.Nil(t, err)
+ assert.Equal(t, 5, len(results))
Review Comment:
Can we inject a different set of numbers that would have a different length
for non bulked results? This could still pass if it doesn't get set properly
and falls back to bulking
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]