From 974b4505d25d27704f2c80ac93350652228e5722 Mon Sep 17 00:00:00 2001 From: Yang Xia <55853655+xiazcy@users.noreply.github.com> Date: Thu, 28 Sep 2023 22:07:44 -0700 Subject: [PATCH] CTR make translator tests for SubgraphStrategy ignore parameter order --- gremlin-go/driver/translator_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gremlin-go/driver/translator_test.go b/gremlin-go/driver/translator_test.go index 907ebf89430..82f2a7a81e1 100644 --- a/gremlin-go/driver/translator_test.go +++ b/gremlin-go/driver/translator_test.go @@ -568,7 +568,8 @@ func Test_translator_Translate(t *testing.T) { assert: func(g *GraphTraversalSource) *GraphTraversal { return g.WithStrategies(SubgraphStrategy(SubgraphStrategyConfig{Vertices: T__.Has("region", "US-TX"), Edges: T__.HasLabel("route")})).V().Count() }, - equals: "g.withStrategies(new SubgraphStrategy(vertices:has('region','US-TX'),edges:hasLabel('route'))).V().count()", + containsRandomClassParams: true, + equals: "g.withStrategies(new SubgraphStrategy(vertices:has('region','US-TX'),edges:hasLabel('route'))).V().count()", }, { assert: func(g *GraphTraversalSource) *GraphTraversal { @@ -580,13 +581,15 @@ func Test_translator_Translate(t *testing.T) { assert: func(g *GraphTraversalSource) *GraphTraversal { return g.WithStrategies(SubgraphStrategy(SubgraphStrategyConfig{Vertices: T__.Has("region", "US-TX"), VertexProperties: T__.HasNot("runways")})).V().Count() }, - equals: "g.withStrategies(new SubgraphStrategy(vertices:has('region','US-TX'),vertexProperties:hasNot('runways'))).V().count()", + containsRandomClassParams: true, + equals: "g.withStrategies(new SubgraphStrategy(vertices:has('region','US-TX'),vertexProperties:hasNot('runways'))).V().count()", }, { assert: func(g *GraphTraversalSource) *GraphTraversal { return g.WithStrategies(ReadOnlyStrategy(), SubgraphStrategy(SubgraphStrategyConfig{Vertices: T__.Has("region", "US-TX"), Edges: T__.HasLabel("route")})).V().Count() }, - equals: "g.withStrategies(new ReadOnlyStrategy(),new SubgraphStrategy(vertices:has('region','US-TX'),edges:hasLabel('route'))).V().count()", + containsRandomClassParams: true, + equals: "g.withStrategies(new ReadOnlyStrategy(),new SubgraphStrategy(vertices:has('region','US-TX'),edges:hasLabel('route'))).V().count()", }, { assert: func(g *GraphTraversalSource) *GraphTraversal {