This is an automated email from the ASF dual-hosted git repository.

xiazcy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
     new 884e28ba48 CTR fix examples to run on master with HTTP
884e28ba48 is described below

commit 884e28ba48463282efc3957170bacccbfc86ec53
Author: Yang Xia <[email protected]>
AuthorDate: Thu Mar 19 16:39:04 2026 -0700

    CTR fix examples to run on master with HTTP
---
 gremlin-driver/src/main/java/examples/ModernTraversals.java |  4 ++--
 gremlin-go/docker-compose.yml                               | 13 ++++++-------
 gremlin-go/examples/basic_gremlin.go                        |  2 +-
 gremlin-go/examples/connections.go                          |  6 ++----
 gremlin-go/examples/go.mod                                  |  2 +-
 gremlin-go/examples/go.sum                                  |  1 +
 gremlin-go/examples/modern_traversals.go                    | 10 +++++-----
 .../src/main/python/examples/modern_traversals.py           |  4 ++--
 8 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/gremlin-driver/src/main/java/examples/ModernTraversals.java 
b/gremlin-driver/src/main/java/examples/ModernTraversals.java
index 90e1c0cda5..afad1cda2b 100644
--- a/gremlin-driver/src/main/java/examples/ModernTraversals.java
+++ b/gremlin-driver/src/main/java/examples/ModernTraversals.java
@@ -45,8 +45,8 @@ public class ModernTraversals {
         List<Edge> e2 = g.V(1).bothE().where(otherV().hasId(2)).toList(); // 
(2)
         Vertex v1 = g.V(1).next();
         Vertex v2 = g.V(2).next();
-        List<Edge> e3 = g.V(v1).bothE().where(otherV().is(v2)).toList(); // (3)
-        List<Edge> e4 = g.V(v1).outE().where(inV().is(v2)).toList(); // (4)
+        List<Edge> e3 = g.V(v1).bothE().where(otherV().id().is(v2)).toList(); 
// (3)
+        List<Edge> e4 = g.V(v1).outE().where(inV().id().is(v2)).toList(); // 
(4)
         List<Edge> e5 = g.V(1).outE().where(inV().has(id, 
within(2,3))).toList(); // (5)
         List<Vertex> e6 = g.V(1).out().where(in().hasId(6)).toList(); // (6)
 
diff --git a/gremlin-go/docker-compose.yml b/gremlin-go/docker-compose.yml
index ae3aff2b93..1e9de54b0d 100644
--- a/gremlin-go/docker-compose.yml
+++ b/gremlin-go/docker-compose.yml
@@ -59,13 +59,12 @@ services:
     working_dir: /go_app
     command: >
       bash -c "go install 
github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
-      && go test -v -json ./... -race -covermode=atomic 
-coverprofile=\"coverage.out\" -coverpkg=./... | gotestfmt"
-#      TODO uncomment once all examples are properly updated to go HTTP
-#      && echo 'Running examples...'
-#      && go run examples/basic_gremlin.go
-#      && go run examples/connections.go
-#      && go run examples/modern_traversals.go
-#      && echo 'All examples completed successfully'"
+      && go test -v -json ./... -race -covermode=atomic 
-coverprofile=\"coverage.out\" -coverpkg=./... | gotestfmt
+      && echo 'Running examples...'
+      && go run examples/basic_gremlin.go
+      && go run examples/connections.go
+      && go run examples/modern_traversals.go
+      && echo 'All examples completed successfully'"
     depends_on:
       gremlin-server-test:
         condition: service_healthy
diff --git a/gremlin-go/examples/basic_gremlin.go 
b/gremlin-go/examples/basic_gremlin.go
index a58ea2af4d..a2a1b900d2 100644
--- a/gremlin-go/examples/basic_gremlin.go
+++ b/gremlin-go/examples/basic_gremlin.go
@@ -43,7 +43,7 @@ func main() {
                return
        }
        defer driverRemoteConnection.Close()
-       g := gremlingo.Traversal_().WithRemote(driverRemoteConnection)
+       g := gremlingo.Traversal_().With(driverRemoteConnection)
 
        // Basic Gremlin: adding and retrieving data
        v1, err := g.AddV(vertexLabel).Property("name", "marko").Next()
diff --git a/gremlin-go/examples/connections.go 
b/gremlin-go/examples/connections.go
index 4a21929447..011d3c6f62 100644
--- a/gremlin-go/examples/connections.go
+++ b/gremlin-go/examples/connections.go
@@ -68,10 +68,8 @@ func withConfigs() {
        driverRemoteConnection, err := 
gremlingo.NewDriverRemoteConnection(serverURL,
                func(settings *gremlingo.DriverRemoteConnectionSettings) {
                        settings.TraversalSource = "g"
-                       settings.NewConnectionThreshold = 4
+                       settings.MaximumConcurrentConnections = 4
                        settings.EnableCompression = false
-                       settings.ReadBufferSize = 0
-                       settings.WriteBufferSize = 0
                })
 
        if err != nil {
@@ -80,7 +78,7 @@ func withConfigs() {
        }
 
        defer driverRemoteConnection.Close()
-       g := gremlingo.Traversal_().WithRemote(driverRemoteConnection)
+       g := gremlingo.Traversal_().With(driverRemoteConnection)
 
        g.AddV(vertexLabel).Iterate()
        count, _ := g.V().HasLabel(vertexLabel).Count().Next()
diff --git a/gremlin-go/examples/go.mod b/gremlin-go/examples/go.mod
index 78f63deb01..ad6ce1c98c 100644
--- a/gremlin-go/examples/go.mod
+++ b/gremlin-go/examples/go.mod
@@ -19,7 +19,7 @@ module example
 
 go 1.25
 
-require github.com/apache/tinkerpop/gremlin-go/v3 v3.7.4
+require github.com/apache/tinkerpop/gremlin-go/v3 v3.8.0
 
 replace github.com/apache/tinkerpop/gremlin-go/v3 => ../
 
diff --git a/gremlin-go/examples/go.sum b/gremlin-go/examples/go.sum
index 4d66940fd6..95d551fa2c 100644
--- a/gremlin-go/examples/go.sum
+++ b/gremlin-go/examples/go.sum
@@ -11,6 +11,7 @@ github.com/nicksnyder/go-i18n/v2 v2.5.0/go.mod 
h1:DrhgsSDZxoAfvVrBVLXoxZn/pN5TXq
 github.com/nicksnyder/go-i18n/v2 v2.6.0/go.mod 
h1:88sRqr0C6OPyJn0/KRNaEz1uWorjxIKP7rUUcvycecE=
 github.com/pmezard/go-difflib v1.0.0 
h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod 
h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/spf13/pflag v1.0.10/go.mod 
h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
 github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
 github.com/stretchr/objx v0.5.2/go.mod 
h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
 github.com/stretchr/testify v1.9.0 
h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
diff --git a/gremlin-go/examples/modern_traversals.go 
b/gremlin-go/examples/modern_traversals.go
index eb7998dabd..d15bed8f45 100644
--- a/gremlin-go/examples/modern_traversals.go
+++ b/gremlin-go/examples/modern_traversals.go
@@ -48,7 +48,7 @@ func main() {
                return
        }
        defer driverRemoteConnection.Close()
-       g := gremlingo.Traversal_().WithRemote(driverRemoteConnection)
+       g := gremlingo.Traversal_().With(driverRemoteConnection)
 
        /*
          This example requires the Modern toy graph to be preloaded upon 
launching the Gremlin server.
@@ -61,10 +61,10 @@ func main() {
        v2, err := g.V(2).Next()
        v1Vertex, err := v1.GetVertex()
        v2Vertex, err := v2.GetVertex()
-       e3, err := 
g.V(v1Vertex).BothE().Where(__.OtherV().Is(v2Vertex)).ToList()   // (3)
-       e4, err := g.V(v1Vertex).OutE().Where(__.InV().Is(v2Vertex)).ToList()   
    // (4)
-       e5, err := g.V(1).OutE().Where(__.InV().Has(T.Id, P.Within(2, 
3))).ToList() // (5)
-       e6, err := g.V(1).Out().Where(__.In().HasId(6)).ToList()                
    // (6)
+       e3, err := 
g.V(v1Vertex).BothE().Where(__.OtherV().Id().Is(v2Vertex)).ToList() // (3)
+       e4, err := 
g.V(v1Vertex).OutE().Where(__.InV().Id().Is(v2Vertex)).ToList()     // (4)
+       e5, err := g.V(1).OutE().Where(__.InV().Has(T.Id, P.Within(2, 
3))).ToList()    // (5)
+       e6, err := g.V(1).Out().Where(__.In().HasId(6)).ToList()                
       // (6)
 
        fmt.Println(e1)
        fmt.Println(e2)
diff --git a/gremlin-python/src/main/python/examples/modern_traversals.py 
b/gremlin-python/src/main/python/examples/modern_traversals.py
index b24d343900..a6fab5fdab 100644
--- a/gremlin-python/src/main/python/examples/modern_traversals.py
+++ b/gremlin-python/src/main/python/examples/modern_traversals.py
@@ -48,8 +48,8 @@ def main():
     e2 = g.V(1).both_e().where(__.other_v().has_id(2)).to_list()  # (2)
     v1 = g.V(1).next()
     v2 = g.V(2).next()
-    e3 = g.V(v1).both_e().where(__.other_v().is_(v2)).to_list()  # (3)
-    e4 = g.V(v1).out_e().where(__.in_v().is_(v2)).to_list()  # (4)
+    e3 = g.V(v1).both_e().where(__.other_v().id_().is_(v2)).to_list()  # (3)
+    e4 = g.V(v1).out_e().where(__.in_v().id_().is_(v2)).to_list()  # (4)
     e5 = g.V(1).out_e().where(__.in_v().has(T.id, P.within(2, 3))).to_list()  
# (5)
     e6 = g.V(1).out().where(__.in_().has_id(6)).to_list()  # (6)
 

Reply via email to